Close completion popup if text len is less than corfu-auto-prefix #455
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.
Currently the auto completion popup appears as soon as user enters
corfu-auto-prefix
number of characters but it never goes away even if user removes some characters. It may not sound like a problem but it freezes Emacs if there are too many options for completion.For example (when
corfu-auto-prefix
==3
):(mes
(I want to enter(message "...")
but then I changed my mind and want to enter something else)s
corfu-auto-prefix
e
m
to auto complete.Expected behavior for me is to close the completion popup as soon as the number of entered characters are less than
corfu-auto-prefix
.This issue is less prominent if you have a habit to use
M-Backspace
instead ofBackspace-Many-Times
as I used to do.I suffer from this issue every day but I can't find anyone complaining about it which makes me think that I either missed a variable that actually fixes this issue or I maybe have too many completion sources which makes my Emacs slow...
In any case, let me know if you find this change valuable and let me know if I can improve anything code-wise.