Remove special case when appending at eol
This commit is contained in:
parent
a834f1aa75
commit
fc4d77964e
|
@ -443,11 +443,7 @@ BufferIterator prepare_insert(Buffer& buffer, const Selection& sel, InsertMode m
|
|||
case InsertMode::Replace:
|
||||
return erase(buffer, sel);
|
||||
case InsertMode::Append:
|
||||
{
|
||||
// special case for end of lines, append to current line instead
|
||||
auto pos = buffer.iterator_at(sel.max());
|
||||
return *pos == '\n' ? pos : utf8::next(pos, buffer.end());
|
||||
}
|
||||
return utf8::next(buffer.iterator_at(sel.max()), buffer.end());
|
||||
case InsertMode::InsertAtLineBegin:
|
||||
return buffer.iterator_at(sel.min().line);
|
||||
case InsertMode::AppendAtLineEnd:
|
||||
|
|
Loading…
Reference in New Issue
Block a user