cursor should be a hollow rect on unfocus, regression from e163e4962baad09cd2c36be1529dee4fcf1220b0

This commit is contained in:
Mitchell Hashimoto
2022-08-05 19:26:50 -07:00
parent dd98768400
commit ce6f022a7e

View File

@ -869,8 +869,13 @@ fn renderTimerCallback(t: *libuv.Timer) void {
const win = t.getData(Window).?; const win = t.getData(Window).?;
// Setup our cursor settings // Setup our cursor settings
win.grid.cursor_visible = win.terminal_cursor.visible and !win.terminal_cursor.blink; if (win.focused) {
win.grid.cursor_style = Grid.CursorStyle.fromTerminal(win.terminal_cursor.style) orelse .box; win.grid.cursor_visible = win.terminal_cursor.visible and !win.terminal_cursor.blink;
win.grid.cursor_style = Grid.CursorStyle.fromTerminal(win.terminal_cursor.style) orelse .box;
} else {
win.grid.cursor_visible = true;
win.grid.cursor_style = .box_hollow;
}
// Calculate foreground and background colors // Calculate foreground and background colors
const bg = win.grid.background; const bg = win.grid.background;