feat(corfu): update minibuffer hints manually
In the scenario where we exit the minibuffer using C-RET or S-RET, we need this advice to ensure that visual hints are updated before exiting.
This commit is contained in:
parent
5ea9c00f30
commit
e0006ac497
1 changed files with 20 additions and 1 deletions
|
@ -49,7 +49,26 @@
|
|||
|
||||
(when (modulep! +orderless)
|
||||
(after! orderless
|
||||
(setq orderless-component-separator #'orderless-escapable-split-on-space))))
|
||||
(setq orderless-component-separator #'orderless-escapable-split-on-space)))
|
||||
|
||||
;; If you want to update the visual hints after completing minibuffer commands
|
||||
;; with Corfu and exiting, you have to do it manually.
|
||||
(defadvice! +corfu--insert-before-exit-minibuffer-a ()
|
||||
:before #'exit-minibuffer
|
||||
(when (or (and (frame-live-p corfu--frame)
|
||||
(frame-visible-p corfu--frame))
|
||||
(and (featurep 'corfu-terminal)
|
||||
(popon-live-p corfu-terminal--popon)))
|
||||
(when (member isearch-lazy-highlight-timer timer-idle-list)
|
||||
(apply (timer--function isearch-lazy-highlight-timer)
|
||||
(timer--args isearch-lazy-highlight-timer)))
|
||||
(when (member (bound-and-true-p anzu--update-timer) timer-idle-list)
|
||||
(apply (timer--function anzu--update-timer)
|
||||
(timer--args anzu--update-timer)))
|
||||
(when (member (bound-and-true-p evil--ex-search-update-timer)
|
||||
timer-idle-list)
|
||||
(apply (timer--function evil--ex-search-update-timer)
|
||||
(timer--args evil--ex-search-update-timer))))))
|
||||
|
||||
(use-package! cape
|
||||
:defer t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue