summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2025-03-26 09:09:16 +1100
committerMaxime Coste <mawww@kakoune.org>2025-03-26 09:09:16 +1100
commit40751c033d5482d5dd56cd83f2f4e130dbb102f7 (patch)
tree4293c42a5c3ebbcbdc8d53224c1703bf43827579 /src
parent04accbb26734fe3f91443ee8567d275a09020f27 (diff)
Make sure captures are taken into account when comparing selections
sel1 == sel2 was using BasicSelection::operator==, ignoring captures, which led to selection history deciding that selection did not change in some cases where only the captures had been updated and for the new selection not to be properly applied, leading to missing capture.
Diffstat (limited to 'src')
-rw-r--r--src/selection.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/selection.hh b/src/selection.hh
index ede4fa7b..6b07e9f8 100644
--- a/src/selection.hh
+++ b/src/selection.hh
@@ -67,6 +67,8 @@ struct Selection : BasicSelection
CaptureList& captures() { return m_captures; }
const CaptureList& captures() const { return m_captures; }
+ friend bool operator==(const Selection&, const Selection&) = default;
+
private:
CaptureList m_captures;
};