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:
parent
bddf06c633
commit
1b99b89b2c
1 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
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;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue