fix: don't stop unindenting on blank or full unindented lines
closes #263
This commit is contained in:
parent
338d7f7bf3
commit
c6d59c1472
1 changed files with 1 additions and 1 deletions
|
@ -3634,7 +3634,7 @@ pub const Editor = struct {
|
||||||
var cursel: CurSel = .{};
|
var cursel: CurSel = .{};
|
||||||
cursel.cursor = cursor.*;
|
cursel.cursor = cursor.*;
|
||||||
const first = find_first_non_ws(root, cursel.cursor.row, self.metrics);
|
const first = find_first_non_ws(root, cursel.cursor.row, self.metrics);
|
||||||
if (first == 0) return error.Stop;
|
if (first == 0) return root;
|
||||||
const off = first % self.indent_size;
|
const off = first % self.indent_size;
|
||||||
const cols = if (off == 0) self.indent_size else off;
|
const cols = if (off == 0) self.indent_size else off;
|
||||||
const sel = cursel.enable_selection(root, self.metrics) catch return error.Stop;
|
const sel = cursel.enable_selection(root, self.metrics) catch return error.Stop;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue