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:
parent
5060f8eeb8
commit
7ea927ffc1
|
@ -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
|
||||
- `window.startup_mode` applied to window again when creating new tab
|
||||
- Crash when leaving search after resize
|
||||
- Cursor being hidden after reaching cursor blinking timeout
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
@ -1266,8 +1266,12 @@ impl input::Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>> {
|
|||
EventType::SearchNext => self.ctx.goto_match(None),
|
||||
EventType::Scroll(scroll) => self.ctx.scroll(scroll),
|
||||
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.dirty = true;
|
||||
}
|
||||
},
|
||||
EventType::BlinkCursorTimeout => {
|
||||
// Disable blinking after timeout reached.
|
||||
|
|
Loading…
Reference in New Issue