mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Make escape clear the current completion
This commit is contained in:
parent
15a63805d9
commit
369229ea71
1 changed files with 8 additions and 1 deletions
|
@ -2204,7 +2204,7 @@ static void set_command_line_and_position(editable_line_t *el, const wcstring &n
|
|||
el->position = pos;
|
||||
data->command_line_changed(el);
|
||||
reader_super_highlight_me_plenty();
|
||||
reader_repaint();
|
||||
reader_repaint_needed();
|
||||
}
|
||||
|
||||
static void reader_replace_current_token(const wchar_t *new_token)
|
||||
|
@ -3182,6 +3182,13 @@ const wchar_t *reader_readline(void)
|
|||
if (last_char != R_YANK && last_char != R_YANK_POP)
|
||||
yank_len=0;
|
||||
|
||||
/* Restore the text */
|
||||
if (c == R_CANCEL && data->is_navigating_pager_contents())
|
||||
{
|
||||
set_command_line_and_position(&data->command_line, data->cycle_command_line, data->cycle_cursor_pos);
|
||||
}
|
||||
|
||||
|
||||
/* Clear the pager if necessary */
|
||||
bool focused_on_search_field = (data->active_edit_line() == &data->pager.search_field_line);
|
||||
if (command_ends_paging(c, focused_on_search_field))
|
||||
|
|
Loading…
Reference in a new issue