Skip to content

Commit 8ace3c9

Browse files
authored
Merge pull request #141 from ErichDonGubler/search-ignore-key-release
fix(search): skip non-press key evts.
2 parents b18dff1 + bdb30e9 commit 8ace3c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/search.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ use crate::{error::MinusError, input::HashedEventRegister, screen};
5757
use crate::{LineNumbers, PagerState};
5858
use crossterm::{
5959
cursor::{self, MoveTo},
60-
event::{self, Event, KeyCode, KeyEvent, KeyModifiers},
60+
event::{self, Event, KeyCode, KeyEvent, KeyEventKind, KeyModifiers},
6161
style::Attribute,
6262
terminal::{Clear, ClearType},
6363
};
@@ -408,6 +408,7 @@ where
408408
};
409409

410410
match so.ev.as_ref().unwrap() {
411+
Event::Key(KeyEvent { kind, .. }) if *kind != KeyEventKind::Press => (),
411412
// If Esc is pressed, cancel the search and also make sure that the search query is
412413
// ")cleared
413414
Event::Key(KeyEvent {

0 commit comments

Comments
 (0)