mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-24 03:56:32 +03:00
Fix selecting of insert text in SelectionList::insert
This commit is contained in:
parent
ec1d5509bb
commit
56dd5f9540
@ -499,8 +499,11 @@ void SelectionList::insert(ArrayView<String> strings, InsertMode mode,
|
||||
|
||||
if (select_inserted or mode == InsertMode::Replace)
|
||||
{
|
||||
sel.min() = change.begin;
|
||||
sel.max() = m_buffer->char_prev(change.end);
|
||||
// we want min and max from *before* we do any change
|
||||
auto& min = sel.min();
|
||||
auto& max = sel.max();
|
||||
min = change.begin;
|
||||
max = m_buffer->char_prev(change.end);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
1
test/unit/concat-paste-line/cmd
Normal file
1
test/unit/concat-paste-line/cmd
Normal file
@ -0,0 +1 @@
|
||||
xy<a-p>
|
1
test/unit/concat-paste-line/in
Normal file
1
test/unit/concat-paste-line/in
Normal file
@ -0,0 +1 @@
|
||||
line
|
2
test/unit/concat-paste-line/out
Normal file
2
test/unit/concat-paste-line/out
Normal file
@ -0,0 +1,2 @@
|
||||
line
|
||||
line
|
1
test/unit/concat-paste-line/state
Normal file
1
test/unit/concat-paste-line/state
Normal file
@ -0,0 +1 @@
|
||||
2.1+5
|
Loading…
Reference in New Issue
Block a user