1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00

Fix cursor being hidden after reaching timeout

The timeout and blink events could be delivered at the same time,
so canceling blinking won't work and we'll still have an event.
This commit is contained in:
Kirill Chibisov 2023-11-10 21:09:43 +04:00 committed by GitHub
parent 5060f8eeb8
commit 7ea927ffc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -65,6 +65,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Crash on exit when using NVIDIA binary drivers on Wayland - Crash on exit when using NVIDIA binary drivers on Wayland
- `window.startup_mode` applied to window again when creating new tab - `window.startup_mode` applied to window again when creating new tab
- Crash when leaving search after resize - Crash when leaving search after resize
- Cursor being hidden after reaching cursor blinking timeout
### Removed ### Removed

View file

@ -1266,8 +1266,12 @@ impl input::Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>> {
EventType::SearchNext => self.ctx.goto_match(None), EventType::SearchNext => self.ctx.goto_match(None),
EventType::Scroll(scroll) => self.ctx.scroll(scroll), EventType::Scroll(scroll) => self.ctx.scroll(scroll),
EventType::BlinkCursor => { EventType::BlinkCursor => {
// Only change state when timeout isn't reached, since we could get
// BlinkCursor and BlinkCursorTimeout events at the same time.
if !*self.ctx.cursor_blink_timed_out {
self.ctx.display.cursor_hidden ^= true; self.ctx.display.cursor_hidden ^= true;
*self.ctx.dirty = true; *self.ctx.dirty = true;
}
}, },
EventType::BlinkCursorTimeout => { EventType::BlinkCursorTimeout => {
// Disable blinking after timeout reached. // Disable blinking after timeout reached.