mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-09 03:16:33 +00:00
renderer: hide cursor is state explicit asks for invisible cursor
This was a regression. The previous logic would always show the cursor if we were using a non-blinking cursor. But, if the terminal state is explicitly requesting an invisible cursor (mode 25) then we need to hide the cursor.
This commit is contained in:
@@ -731,11 +731,15 @@ pub fn render(
|
||||
// Setup our cursor state
|
||||
if (self.focused) {
|
||||
self.cursor_visible = visible: {
|
||||
// If the cursor is explicitly not visible in the state,
|
||||
// then it is not visible.
|
||||
if (!state.cursor.visible) break :visible false;
|
||||
|
||||
// If the cursor isn't a blinking style, then never blink.
|
||||
if (!state.cursor.style.blinking()) break :visible true;
|
||||
|
||||
// Otherwise, adhere to our current state.
|
||||
break :visible self.cursor_visible and state.cursor.visible;
|
||||
break :visible self.cursor_visible;
|
||||
};
|
||||
self.cursor_style = renderer.CursorStyle.fromTerminal(state.cursor.style) orelse .box;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user