Skip to content

Commit

Permalink
Fix hollow block cursor being drawn for hidden cursor
Browse files Browse the repository at this point in the history
Commit 530de00 refactored large chunk of Alacritty's internal handling
of renderable cells, cursors, and such. This patch fixes a regression
where a hollow block cursor was drawn for unfocused windows even if the
terminal cursor was hidden.
  • Loading branch information
kchibisov authored Feb 26, 2021
1 parent ea24a10 commit 72b3414
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Alacritty failing to start on X11 with invalid DPI reported by XRandr
- Text selected after search without any match
- Incorrect vi cursor position after leaving search
- Hollow block cursor being drawn when the cursor is hidden for unfocused window

### Removed

Expand Down
2 changes: 1 addition & 1 deletion alacritty/src/display/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl<'a> RenderableContent<'a> {

// Copy the cursor and override its shape if necessary.
let mut terminal_cursor = terminal_content.cursor;
if !show_cursor {
if !show_cursor || terminal_cursor.shape == CursorShape::Hidden {
terminal_cursor.shape = CursorShape::Hidden;
} else if !term.is_focused && config.cursor.unfocused_hollow {
terminal_cursor.shape = CursorShape::HollowBlock;
Expand Down

0 comments on commit 72b3414

Please sign in to comment.