mirror of
https://github.com/alacritty/alacritty.git
synced 2026-11-30 00:51:19 +03:00
Fix characters swallowed during search
This resolves a bug where characters get swallowed when pressing them after pressing backspace before the backspace key is released.
This commit is contained in:
1 parent
4b516c6365
commit
1d00883f10
2 files changed
+5
-2
No files matched your search
@@ -28,6 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
- Incorrect window location with negative `window.position` config options
|
||||
- Slow rendering performance with HiDPI displays, especially on macOS
|
||||
- Keys swallowed during search when pressing them right before releasing backspace
|
||||
|
||||
## 0.5.0
|
||||
|
||||
|
||||
@@ -863,7 +863,7 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
|
||||
*self.ctx.received_count() = 0;
|
||||
self.process_key_bindings(input);
|
||||
},
|
||||
ElementState::Released => *self.ctx.suppress_chars() = false,
|
||||
ElementState::Released => (),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -892,6 +892,8 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
|
||||
}
|
||||
}
|
||||
|
||||
*self.ctx.suppress_chars() = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -951,7 +953,7 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
|
||||
let binding = binding.clone();
|
||||
binding.execute(&mut self.ctx);
|
||||
|
||||
// Don't suppress when there has been a `ReceiveChar` action.
|
||||
// Pass through the key if any of the bindings has the `ReceiveChar` action.
|
||||
*suppress_chars.get_or_insert(true) &= binding.action != Action::ReceiveChar;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user