Merge pull request #409 from mitchellh/cursor-focus-box

renderer: always show cursor if window is not focused
This commit is contained in:
Mitchell Hashimoto
2023-09-06 11:34:26 -07:00
committed by GitHub
2 changed files with 8 additions and 0 deletions

View File

@ -494,6 +494,10 @@ pub fn render(
// If the cursor isn't a blinking style, then never blink.
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.
break :visible self.cursor_visible;
};

View File

@ -736,6 +736,10 @@ pub fn render(
// If the cursor isn't a blinking style, then never blink.
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.
break :visible self.cursor_visible;
};