mirror of
https://github.com/atuinsh/atuin.git
synced 2024-12-28 09:59:44 +01:00
Respect exit_mode setting when exiting with arrow down keypress (#807)
This commit is contained in:
parent
3b77e1130c
commit
03f7e5543e
@ -231,7 +231,12 @@ impl State {
|
|||||||
self.search.switched_search_mode = true;
|
self.search.switched_search_mode = true;
|
||||||
self.search.search_mode = self.search.search_mode.next(settings);
|
self.search.search_mode = self.search.search_mode.next(settings);
|
||||||
}
|
}
|
||||||
KeyCode::Down if self.results_state.selected() == 0 => return Some(RETURN_ORIGINAL),
|
KeyCode::Down if self.results_state.selected() == 0 => {
|
||||||
|
return Some(match settings.exit_mode {
|
||||||
|
ExitMode::ReturnOriginal => RETURN_ORIGINAL,
|
||||||
|
ExitMode::ReturnQuery => RETURN_QUERY,
|
||||||
|
})
|
||||||
|
}
|
||||||
KeyCode::Down => {
|
KeyCode::Down => {
|
||||||
let i = self.results_state.selected().saturating_sub(1);
|
let i = self.results_state.selected().saturating_sub(1);
|
||||||
self.results_state.select(i);
|
self.results_state.select(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user