diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-02-24 21:09:09 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-02-24 21:09:09 +1100 |
| commit | a0de41d165c5e71f7672e44f4f6d2d09aae9d173 (patch) | |
| tree | e928713cb122b9f69640a1f1e3025b7dec06c5e3 | |
| parent | cda1fdafe24e6706a02d68648e0ab48e0c7f85a3 (diff) | |
goto last change: do not try to avoid end of lines
Avoiding end of line is a behaviour we avoid (pun intended) more and more
in Kakoune source code, now that end of lines are regularly selected, it
makes no sense to just to next line when last modification lies on an EOL
(and it probably did not make much sense back when that code was written).
| -rw-r--r-- | src/normal.cc | 2 | ||||
| -rw-r--r-- | test/normal/goto-extending/last-change/selections | 2 | ||||
| -rw-r--r-- | test/normal/goto/last-change/selections | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/normal.cc b/src/normal.cc index 5a631e76..85597432 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -280,8 +280,6 @@ void goto_commands(Context& context, NormalParams params) auto pos = buffer.last_modification_coord(); if (pos >= buffer.back_coord()) pos = buffer.back_coord(); - else if (buffer[pos.line].length() == pos.column + 1) - pos = BufferCoord{ pos.line+1, 0 }; select_coord<mode>(buffer, pos, context.selections()); break; } diff --git a/test/normal/goto-extending/last-change/selections b/test/normal/goto-extending/last-change/selections index c4ff167b..333dc6b4 100644 --- a/test/normal/goto-extending/last-change/selections +++ b/test/normal/goto-extending/last-change/selections @@ -1,3 +1,3 @@ foo -b + diff --git a/test/normal/goto/last-change/selections b/test/normal/goto/last-change/selections index 61780798..139597f9 100644 --- a/test/normal/goto/last-change/selections +++ b/test/normal/goto/last-change/selections @@ -1 +1,2 @@ -b + + |
