mirror of
https://github.com/mawww/kakoune.git
synced 2025-04-11 21:18:46 +02:00
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:
parent
04accbb267
commit
40751c033d
4 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
|
|
1
test/regression/5298-missing-capture-register/cmd
Normal file
1
test/regression/5298-missing-capture-register/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
s(.*)<ret>
|
1
test/regression/5298-missing-capture-register/in
Normal file
1
test/regression/5298-missing-capture-register/in
Normal file
|
@ -0,0 +1 @@
|
|||
%(foo)
|
1
test/regression/5298-missing-capture-register/kak_reg_0
Normal file
1
test/regression/5298-missing-capture-register/kak_reg_0
Normal file
|
@ -0,0 +1 @@
|
|||
foo
|
Loading…
Add table
Reference in a new issue