diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-07-04 19:42:32 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-07-05 08:00:14 +1000 |
| commit | 63d4c8c3114862a49a2a4a54b2f229f9260bf291 (patch) | |
| tree | 47c562d1632fffbfcd2a7cadb0a410aa01f24dce /src/selection.cc | |
| parent | 55a5ec3bbdf7c605265859b5fde8ea1d4c02f15d (diff) | |
Change `a` on end of line behaviour to be consistent
`a` will just jump on next line, `a` on last end of line opens a new
line beneath it.
Fixes #1164
Diffstat (limited to 'src/selection.cc')
| -rw-r--r-- | src/selection.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/selection.cc b/src/selection.cc index c8ab543b..c245095d 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -357,11 +357,7 @@ BufferCoord get_insert_pos(const Buffer& buffer, const Selection& sel, case InsertMode::InsertCursor: return sel.cursor(); case InsertMode::Append: - { - // special case for end of lines, append to current line instead - auto pos = sel.max(); - return buffer.byte_at(pos) == '\n' ? pos : buffer.char_next(pos); - } + return buffer.char_next(sel.max()); case InsertMode::InsertAtLineBegin: return sel.min().line; case InsertMode::AppendAtLineEnd: |
