diff options
author | Michael Davis | 2023-03-01 01:26:02 +0000 |
---|---|---|
committer | GitHub | 2023-03-01 01:26:02 +0000 |
commit | 27211abf0688794f9bf7a395a8c47846b4f7fd41 (patch) | |
tree | 8a1f522b1bd42a855faf19a6706a9099ddd93d91 /helix-term | |
parent | 8dab8a0a039fe1f3dd98fc62ac97d2f1c089793a (diff) |
Ignore key-release keyboard events (#6139)
Since crossterm 0.26.x, we receive press/release keyboard events on
Windows always. We can ignore the release events though to emulate
the behavior of keyboard input on Windows on crossterm 0.25.x.
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/application.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index d7896419..ee2a438c 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -638,6 +638,11 @@ impl Application { self.compositor .handle_event(&Event::Resize(width, height), &mut cx) } + // Ignore keyboard release events. + CrosstermEvent::Key(crossterm::event::KeyEvent { + kind: crossterm::event::KeyEventKind::Release, + .. + }) => false, event => self.compositor.handle_event(&event.into(), &mut cx), }; |