Respect exit_mode setting when exiting with arrow down keypress (#807)
This commit is contained in:
parent
3b77e1130c
commit
03f7e5543e
1 changed files with 6 additions and 1 deletions
|
@ -231,7 +231,12 @@ impl State {
|
|||
self.search.switched_search_mode = true;
|
||||
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 => {
|
||||
let i = self.results_state.selected().saturating_sub(1);
|
||||
self.results_state.select(i);
|
||||
|
|
Loading…
Reference in a new issue