mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-25 01:34:13 +01:00
fix
This commit is contained in:
parent
1e73c17cd7
commit
d2665b1153
@ -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()
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user