From d26d830246e9ed342878a13b8a84b5a43f1011be Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 6 Dec 2024 21:20:04 +0100 Subject: [PATCH] fix: move a cursor at the beginning of a line that is being indented --- src/tui/editor.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index f8fa0dd..a6fd898 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -2575,7 +2575,7 @@ pub const Editor = struct { var cursel: CurSel = .{}; cursel.cursor = cursor; const cols = self.indent_size - find_first_non_ws(root, cursel.cursor.row, self.metrics) % self.indent_size; - try smart_move_cursor_begin(root, &cursel.cursor, self.metrics); + try move_cursor_begin(root, &cursel.cursor, self.metrics); return self.insert(root, &cursel, space[0..cols], allocator) catch return error.Stop; }