Remove special case when appending at eol

This commit is contained in:
Maxime Coste 2014-12-13 13:10:40 +00:00
parent a834f1aa75
commit fc4d77964e

View File

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