mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Allow autosuggestion after completion
It seems kinda silly to not directly do it, but it was explicitly stopped in the code. I'm quite good at deleting that, aren't I? Fixes #3016.
This commit is contained in:
parent
7af9e1f5c5
commit
2885c085d8
1 changed files with 3 additions and 6 deletions
|
@ -1127,9 +1127,6 @@ static void completion_insert(const wchar_t *val, complete_flags_t flags) {
|
|||
wcstring new_command_line = completion_apply_to_command_line(val, flags, el->text, &cursor,
|
||||
false /* not append only */);
|
||||
reader_set_buffer_maintaining_pager(new_command_line, cursor);
|
||||
|
||||
// Since we just inserted a completion, don't immediately do a new autosuggestion.
|
||||
data->suppress_autosuggestion = true;
|
||||
}
|
||||
|
||||
struct autosuggestion_context_t {
|
||||
|
@ -2775,15 +2772,15 @@ const wchar_t *reader_readline(int nchars) {
|
|||
// Evaluate. If the current command is unfinished, or if the charater is escaped using a
|
||||
// backslash, insert a newline.
|
||||
case R_EXECUTE: {
|
||||
// Delete any autosuggestion.
|
||||
data->autosuggestion.clear();
|
||||
|
||||
// If the user hits return while navigating the pager, it only clears the pager.
|
||||
if (data->is_navigating_pager_contents()) {
|
||||
clear_pager();
|
||||
break;
|
||||
}
|
||||
|
||||
// Delete any autosuggestion.
|
||||
data->autosuggestion.clear();
|
||||
|
||||
// The user may have hit return with pager contents, but while not navigating them.
|
||||
// Clear the pager in that event.
|
||||
clear_pager();
|
||||
|
|
Loading…
Reference in a new issue