From fc4d77964e14a8760be22c93d01cd68c9b71d228 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 13 Dec 2014 13:10:40 +0000 Subject: [PATCH] Remove special case when appending at eol --- src/selection.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/selection.cc b/src/selection.cc index d5f72eb3..a9623a73 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -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: