From ec71a7041b81042251eaec658119eeb6c24cec9b Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Sun, 1 Feb 2026 20:20:34 +0100 Subject: [PATCH] feat: reflow current line if there is no selection --- src/tui/editor.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index df8754d..6a461cf 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -6849,6 +6849,8 @@ pub const Editor = struct { pub fn reflow(self: *Self, ctx: Context) Result { const b = try self.buf_for_update(); + if (!self.has_secondary_cursors()) if (self.get_primary().selection == null) + try self.select_line_at_cursor(b.root, self.get_primary(), .exclude_eol); const root = try self.with_cursels_mut_once_arg(b.root, reflow_cursel, b.allocator, ctx); try self.update_buf(root); self.clamp();