diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2016-05-25 21:23:50 +0200 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-05-27 15:02:56 -0700 |
commit | 2885c085d8da65156001592cca1bb3e3002b164b (patch) | |
tree | 517ed54a0dbf6a945284f4e81078d97e04262e24 /src | |
parent | 7af9e1f5c5bfe9b295309094fb03ef27ee6ca1fd (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/reader.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/reader.cpp b/src/reader.cpp index 47258c64..6b23e129 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -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(); |