Closed olnw closed 9 months ago
Good idea. Please let me know if the improved corfu-reset works as expected.
Thanks, it works how I expected. Unless I'm mistaken, it's now unnecessary to check if the last command was corfu-reset
, since by that point a new change group has been started and (equal str (buffer-substring-no-properties beg end))
will be t
.
Thanks, indeed!
I have perceived a problem with the current implementation of
corfu-reset
. Please inform me if I am misunderstanding anything.Scenario A: you would like to close Corfu immediately after it has opened. In this case, you would have to run
corfu-reset
twice.corfu-reset
,corfu-quit
will be called.Scenario B: you manually invoke corfu (say, with
completion-at-point
) and then scroll through the candidate list. Then, you would like to quit the pop-up by runningcorfu-reset
.this-command
is then set tocorfu-first
.corfu-reset
,corfu-quit
will be called.Here is a proof-of-concept solution using advice. Of course, a real solution would directly modify the involved functions. I am also not familiar with the Corfu codebase, so what follows is likely sub-optimal.