fix: move a cursor at the beginning of a line that is being indented
This commit is contained in:
parent
c282398d6e
commit
d26d830246
1 changed files with 1 additions and 1 deletions
|
@ -2575,7 +2575,7 @@ pub const Editor = struct {
|
||||||
var cursel: CurSel = .{};
|
var cursel: CurSel = .{};
|
||||||
cursel.cursor = cursor;
|
cursel.cursor = cursor;
|
||||||
const cols = self.indent_size - find_first_non_ws(root, cursel.cursor.row, self.metrics) % self.indent_size;
|
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;
|
return self.insert(root, &cursel, space[0..cols], allocator) catch return error.Stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue