summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-04-25 18:44:14 +0100
committerMaxime Coste <mawww@kakoune.org>2017-05-07 16:26:14 +0100
commit93408e4b76f5d85fec2354c36a212d40df4fbc84 (patch)
treee56dc8aa3162b1358b52a11901e336c46531e21a /src/normal.cc
parent3a3144f3f5c822d8931baf2a94bb75cfe4024a18 (diff)
Do not use any display information to determine where the cursor moves
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/normal.cc b/src/normal.cc
index bd124ff6..d9f23f1b 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -1696,9 +1696,7 @@ void move(Context& context, NormalParams params)
auto& selections = context.selections();
for (auto& sel : selections)
{
- auto cursor = context.has_window() ? context.window().offset_coord(sel.cursor(), offset)
- : context.buffer().offset_coord(sel.cursor(), offset);
-
+ auto cursor = context.buffer().offset_coord(sel.cursor(), offset);
sel.anchor() = mode == SelectMode::Extend ? sel.anchor() : cursor;
sel.cursor() = cursor;
}