From c6d59c14723d7ccc9c2e8ae73fad8945216e874f Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 3 Jul 2025 09:39:03 +0200 Subject: [PATCH] fix: don't stop unindenting on blank or full unindented lines closes #263 --- 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 5b14afc..6aaf5e8 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -3634,7 +3634,7 @@ pub const Editor = struct { var cursel: CurSel = .{}; cursel.cursor = cursor.*; 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 cols = if (off == 0) self.indent_size else off; const sel = cursel.enable_selection(root, self.metrics) catch return error.Stop;