From 1b99b89b2c41022db534cd97633e1cc75500ee94 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 9 Apr 2026 13:58:51 +0200 Subject: [PATCH] fix(terminal): use mode.cursor instead of scr.cursor_vis The latter is never cleared between frames and would leave the cursor visible after the terminal app hides it. --- src/tui/terminal_view.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tui/terminal_view.zig b/src/tui/terminal_view.zig index 9204b655..eadb52ab 100644 --- a/src/tui/terminal_view.zig +++ b/src/tui/terminal_view.zig @@ -401,10 +401,9 @@ pub fn render(self: *Self, theme: *const Widget.Theme) bool { } } - if (!software_cursor and self.focused and tui.terminal_has_focus()) { + if (!software_cursor and self.focused and tui.terminal_has_focus() and self.vt.vt.mode.cursor) { const scr = &tui.rdr().vx.screen; - if (scr.cursor_vis) - tui.rdr().cursor_enable(@intCast(scr.cursor.row), @intCast(scr.cursor.col), scr.cursor_shape) catch {}; + tui.rdr().cursor_enable(@intCast(scr.cursor.row), @intCast(scr.cursor.col), scr.cursor_shape) catch {}; } return false;