Do not prevent multiple tab-completions with the same command line

The comp_empty variable was assigned a sucecss value, leading fish
to think that the set of completions was empty when it is not.

Fixes #6863
This commit is contained in:
ridiculousfish 2020-04-05 18:55:28 -07:00
parent 77fb54fa99
commit 41dcf84386

View File

@ -2735,8 +2735,8 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat
cycle_cursor_pos = token_end - buff;
bool cont_after_prefix_insertion = (c == rl::complete_and_search);
rls.comp_empty = handle_completions(rls.comp, token_begin - buff, token_end - buff,
cont_after_prefix_insertion);
rls.comp_empty = !handle_completions(rls.comp, token_begin - buff, token_end - buff,
cont_after_prefix_insertion);
// Show the search field if requested and if we printed a list of completions.
if (c == rl::complete_and_search && !rls.comp_empty && !pager.empty()) {