mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-05 17:36:32 +00:00
renderer: always show cursor if window is not focused
Fixes #400 This ensures the hollow box is shown even if the cursor is not in a blinking state when unfocus happens. We still hide the cursor even on unfocus if the terminal mode explictly asks for a hidden cursor.
This commit is contained in:
@@ -494,6 +494,10 @@ pub fn render(
|
|||||||
// If the cursor isn't a blinking style, then never blink.
|
// If the cursor isn't a blinking style, then never blink.
|
||||||
if (!selected_cursor_style.blinking()) break :visible true;
|
if (!selected_cursor_style.blinking()) break :visible true;
|
||||||
|
|
||||||
|
// If we're not focused, our cursor is always visible so that
|
||||||
|
// we can show the hollow box.
|
||||||
|
if (!self.focused) break :visible true;
|
||||||
|
|
||||||
// Otherwise, adhere to our current state.
|
// Otherwise, adhere to our current state.
|
||||||
break :visible self.cursor_visible;
|
break :visible self.cursor_visible;
|
||||||
};
|
};
|
||||||
|
@@ -736,6 +736,10 @@ pub fn render(
|
|||||||
// If the cursor isn't a blinking style, then never blink.
|
// If the cursor isn't a blinking style, then never blink.
|
||||||
if (!selected_cursor_style.blinking()) break :visible true;
|
if (!selected_cursor_style.blinking()) break :visible true;
|
||||||
|
|
||||||
|
// If we're not focused, our cursor is always visible so that
|
||||||
|
// we can show the hollow box.
|
||||||
|
if (!self.focused) break :visible true;
|
||||||
|
|
||||||
// Otherwise, adhere to our current state.
|
// Otherwise, adhere to our current state.
|
||||||
break :visible self.cursor_visible;
|
break :visible self.cursor_visible;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user