diff --git a/src/command/client/search/core.rs b/src/command/client/search/core.rs index f5d25c12..0ada0a2f 100644 --- a/src/command/client/search/core.rs +++ b/src/command/client/search/core.rs @@ -260,9 +260,9 @@ impl State { 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() }); } diff --git a/src/command/client/search/tui_shell.rs b/src/command/client/search/tui_shell.rs index e4b8f021..3611be14 100644 --- a/src/command/client/search/tui_shell.rs +++ b/src/command/client/search/tui_shell.rs @@ -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();