summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2021-02-26 23:36:38 +0300
committerGitHub <noreply@github.com>2021-02-26 20:36:38 +0000
commit72b341425d8a27026d9dde00519a84f1a6b85bb9 (patch)
treed494a0910e98139a13e7ab69fa4b0053dff707c2
parentea24a106e943473637c5cadc1a48914a6b8dbd19 (diff)
downloadalacritty-72b341425d8a27026d9dde00519a84f1a6b85bb9.tar.gz
alacritty-72b341425d8a27026d9dde00519a84f1a6b85bb9.zip
Fix hollow block cursor being drawn for hidden cursor
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.
-rw-r--r--CHANGELOG.md1
-rw-r--r--alacritty/src/display/content.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b6dd2df1..63d8c803 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/alacritty/src/display/content.rs b/alacritty/src/display/content.rs
index 1c7e2989..9f035a1c 100644
--- a/alacritty/src/display/content.rs
+++ b/alacritty/src/display/content.rs
@@ -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;