diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 089f0e7..22d639c 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -2435,6 +2435,7 @@ pub const Editor = struct { fn select_word_at_cursor(self: *Self, cursel: *CurSel) !*Selection { const root = try self.buf_root(); const sel = cursel.enable_selection(); + defer cursel.check_selection(); sel.normalize(); try move_cursor_word_begin(root, &sel.begin); try move_cursor_word_end(root, &sel.end);