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)
|
if (select_inserted or mode == InsertMode::Replace)
|
||||||
{
|
{
|
||||||
sel.min() = change.begin;
|
// we want min and max from *before* we do any change
|
||||||
sel.max() = m_buffer->char_prev(change.end);
|
auto& min = sel.min();
|
||||||
|
auto& max = sel.max();
|
||||||
|
min = change.begin;
|
||||||
|
max = m_buffer->char_prev(change.end);
|
||||||
}
|
}
|
||||||
else
|
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