Fix replacing at begining of buffer

Fixes #3275
This commit is contained in:
Maxime Coste 2019-12-31 12:45:55 +11:00
parent 22bfbd06af
commit a17a0345cf
4 changed files with 4 additions and 1 deletions

View File

@ -413,7 +413,7 @@ void SelectionList::insert(ConstArrayView<String> strings, InsertMode mode,
auto& min = sel.min();
auto& max = sel.max();
min = range.begin;
max = m_buffer->char_prev(range.end);
max = range.end > range.begin ? m_buffer->char_prev(range.end) : range.begin;
}
else
{

View File

@ -0,0 +1 @@
R

View File

@ -0,0 +1 @@
foo

View File

@ -0,0 +1 @@
oo