Repository navigation
fix(completions): keep menus open on no match, let cancelled pickers close and reopen - #19129
Merged
fdncred merged 2 commits intoOct 1, 2026
Merged
Conversation
2 tasks done
Contributor
|
Thanks for stepping in and putting this up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Since #18791 every completion menu closes as soon as the typed text matches nothing, with
persistent_menuson too (#19096).SourcedMenu::abandon_if_emptycloses on any settled empty answer, and #18791 wrapped the default columnar and ide menus in it as well.The abandon exists for cancelled pickers: an
@interactivecompleter or menu source cancelled with Esc answers empty, and an open empty menu would relaunch it on the next keystroke.A cancelled picker is always the first answer after activation though, while typing past all matches comes after the menu has shown values.
So
SourcedMenunow remembers whether it has shown values since the lastActivate, and only abandons when the first answer is empty.Testing the picker path turned up two older bugs, both also on
main:quickoff, the openingcan_partially_completeprobe is the first fetch, but the wrapper skipped the abandon check there. The menu only closed on the next repaint, after the prompt had drawn its indicator, so a|stayed until the next keypress. The probe now checks too; a probe that fetched nothing is still covered byis_awaiting_first_answer.NuCompleterkept the cancelled picker's empty answer inlatest, so Tab on the same line served it again instead of running the picker. Interactive answers are now kept only when non-empty, which still dedupes the repeated asks of one keystroke.User-facing changes (Release notes)
Completion menus stay open when nothing matches
An open completion menu no longer closes when the typed text stops matching.
It shows
NO RECORDS FOUNDand fills again once the text matches, as it did before 0.116.Cancelling an
@interactivepicker with Esc now closes its menu right away, and Tab on the same line opens the picker again.Additional notes
fixes #19096