1
1
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:
Maxime Coste 2015-02-09 21:09:17 +00:00
parent ec1d5509bb
commit 56dd5f9540
5 changed files with 10 additions and 2 deletions

View File

@ -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
{

View File

@ -0,0 +1 @@
xy<a-p>

View File

@ -0,0 +1 @@
line

View File

@ -0,0 +1,2 @@
line
line

View File

@ -0,0 +1 @@
2.1+5