This commit is contained in:
Conrad Ludgate 2023-03-23 13:55:19 +00:00
parent 1e73c17cd7
commit d2665b1153
No known key found for this signature in database
GPG Key ID: 197E3CACA1C980B5
2 changed files with 6 additions and 4 deletions

View File

@ -260,9 +260,9 @@ impl<DB: Database> State<DB> {
Event::SelectN(n) => {
let i = self.results_state.selected().saturating_add(n as usize);
return ControlFlow::Break(if i < self.history.len() {
self.search.input.into_inner()
} else {
self.history.swap_remove(i).command.clone()
} else {
self.search.input.into_inner()
});
}

View File

@ -287,7 +287,8 @@ impl Stdout {
execute!(
stdout,
terminal::EnterAlternateScreen,
event::EnableMouseCapture
event::EnableMouseCapture,
event::EnableBracketedPaste,
)?;
Ok(Self { stdout })
}
@ -298,7 +299,8 @@ impl Drop for Stdout {
execute!(
self.stdout,
terminal::LeaveAlternateScreen,
event::DisableMouseCapture
event::DisableMouseCapture,
event::DisableBracketedPaste,
)
.unwrap();
terminal::disable_raw_mode().unwrap();