From 5ee21ec932d1da0f1fbae8ee1f13b967b8014307 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 27 Apr 2017 20:23:23 +0100 Subject: Respect tabstop in Buffer::offset_coord --- src/input_handler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/input_handler.cc') diff --git a/src/input_handler.cc b/src/input_handler.cc index b7f424aa..07175af9 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -1240,9 +1240,10 @@ private: void move(Type offset) { auto& selections = context().selections(); + const ColumnCount tabstop = context().options()["tabstop"].get(); 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() = sel.cursor() = cursor; } selections.sort_and_merge_overlapping(); -- cgit v1.2.3