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.
This commit is contained in:
Maxime Coste 2025-03-26 09:09:16 +11:00
parent 04accbb267
commit 40751c033d
4 changed files with 5 additions and 0 deletions

View file

@ -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;
};

View file

@ -0,0 +1 @@
s(.*)<ret>

View file

@ -0,0 +1 @@
%(foo)

View file

@ -0,0 +1 @@
foo