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.
This commit is contained in:
CJ van den Berg 2026-04-09 13:58:51 +02:00
parent bddf06c633
commit 1b99b89b2c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -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;