diff options
| author | YummyOreo <bobgim20@gmail.com> | 2023-03-14 06:47:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-14 11:47:24 +0000 |
| commit | 88deec31c8e48a743231f2f1387f34788fe0cfff (patch) | |
| tree | bb59b04e3ea307b00026379aa4671d124b593687 /src | |
| parent | Add mailmap and update author information for github@nwex.de (#782) (diff) | |
| download | atuin-88deec31c8e48a743231f2f1387f34788fe0cfff.zip | |
Fixes a bug on windows (#780)
* Fixes the windows double input issue instead of the patchy way
* clippy allow
Diffstat (limited to 'src')
| -rw-r--r-- | src/command/client/search/interactive.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/command/client/search/interactive.rs b/src/command/client/search/interactive.rs index 4a29ee47..45c532f0 100644 --- a/src/command/client/search/interactive.rs +++ b/src/command/client/search/interactive.rs @@ -96,12 +96,17 @@ impl State { None } + #[allow(clippy::too_many_lines)] fn handle_key_input( &mut self, settings: &Settings, input: &KeyEvent, len: usize, ) -> Option<usize> { + if input.kind == event::KeyEventKind::Release { + return None; + } + let ctrl = input.modifiers.contains(KeyModifiers::CONTROL); let alt = input.modifiers.contains(KeyModifiers::ALT); match input.code { @@ -483,13 +488,6 @@ pub async fn history( let initial_input = app.input.as_str().to_owned(); let initial_filter_mode = app.filter_mode; - { - // We do this because windows does double inputs and captures the `Enter` when running a - // command - #[cfg(target_os = "windows")] - let _ = event::read(); - }; - let event_ready = tokio::task::spawn_blocking(|| event::poll(Duration::from_millis(250))); tokio::select! { |
