mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 01:11:15 -03:00
Recompute completions if previous attempt failed
When pressing tab repeatedly, completions only computed on the first one. This is because the old logic assumed that completions are present if the last key was tab. Recompute them if there are no completions at all. Fixes #6863
This commit is contained in:
@@ -2814,7 +2814,7 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat
|
||||
// Use the command line only; it doesn't make sense to complete in any other line.
|
||||
editable_line_t *el = &command_line;
|
||||
if (is_navigating_pager_contents() ||
|
||||
(!rls.complete_did_insert && rls.last_cmd == rl::complete)) {
|
||||
(!rls.comp.empty() && !rls.complete_did_insert && rls.last_cmd == rl::complete)) {
|
||||
// The user typed complete more than once in a row. If we are not yet fully
|
||||
// disclosed, then become so; otherwise cycle through our available completions.
|
||||
if (current_page_rendering.remaining_to_disclose > 0) {
|
||||
|
||||
Reference in New Issue
Block a user