From 27211abf0688794f9bf7a395a8c47846b4f7fd41 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Tue, 28 Feb 2023 19:26:02 -0600 Subject: 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.--- helix-term/src/application.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'helix-term/src') 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), }; -- cgit v1.2.3-70-g09d2