summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-02-24 21:09:09 +1100
committerMaxime Coste <mawww@kakoune.org>2018-02-24 21:09:09 +1100
commita0de41d165c5e71f7672e44f4f6d2d09aae9d173 (patch)
treee928713cb122b9f69640a1f1e3025b7dec06c5e3
parentcda1fdafe24e6706a02d68648e0ab48e0c7f85a3 (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.cc2
-rw-r--r--test/normal/goto-extending/last-change/selections2
-rw-r--r--test/normal/goto/last-change/selections3
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
+
+