mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-11 20:48:49 +00:00
Minor refactoring in handle_execute
A failing ctrl-r search term is inserted back into the command line. This should go through the same code path as other editions.
This commit is contained in:
parent
da0a93b24b
commit
a719f9d537
1 changed files with 3 additions and 7 deletions
|
@ -3589,13 +3589,9 @@ impl<'a> Reader<'a> {
|
|||
// If the user hits return while navigating the pager, it only clears the pager.
|
||||
if self.is_navigating_pager_contents() {
|
||||
if self.history_pager.is_some() && self.pager.selected_completion_idx.is_none() {
|
||||
self.data.command_line.push_edit(
|
||||
Edit::new(
|
||||
0..self.data.command_line.len(),
|
||||
self.data.pager.search_field_line.text().to_owned(),
|
||||
),
|
||||
/*allow_coalesce=*/ false,
|
||||
);
|
||||
let range = 0..self.data.command_line.len();
|
||||
let failed_search_string = self.data.pager.search_field_line.text().to_owned();
|
||||
self.replace_substring(EditableLineTag::Commandline, range, failed_search_string);
|
||||
self.data
|
||||
.command_line
|
||||
.set_position(self.data.pager.search_field_line.position());
|
||||
|
|
Loading…
Reference in a new issue