summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-04-27 20:23:23 +0100
committerMaxime Coste <mawww@kakoune.org>2017-05-07 16:26:14 +0100
commit5ee21ec932d1da0f1fbae8ee1f13b967b8014307 (patch)
tree85caa9c6bcec24a1cec917910fe72a36a560d349 /src/normal.cc
parent57c2b32d2082d67f1d2c1a168cf88a0677c73e18 (diff)
Respect tabstop in Buffer::offset_coord
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/normal.cc b/src/normal.cc
index d9f23f1b..25becfff 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -1693,10 +1693,11 @@ void move(Context& context, NormalParams params)
Type offset(std::max(params.count,1));
if (direction == Backward)
offset = -offset;
+ const ColumnCount tabstop = context.options()["tabstop"].get<int>();
auto& selections = context.selections();
for (auto& sel : selections)
{
- auto cursor = context.buffer().offset_coord(sel.cursor(), offset);
+ auto cursor = context.buffer().offset_coord(sel.cursor(), offset, tabstop);
sel.anchor() = mode == SelectMode::Extend ? sel.anchor() : cursor;
sel.cursor() = cursor;
}