1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-31 01:32:00 -07:00

Fix Completions buffer disappearing with tmm-menubar (bug#80995)

* lisp/minibuffer.el (completions--start-background-update):
Cancel a possible leftover timer (e.g. from the previous
after-change hook) that would suppress the display of
*Completions* when 'completion-eager-update' is nil.
(completions--after-change): Don't start background update
when not required to automatically update *Completions*.
This commit is contained in:
Juri Linkov 2026-05-11 20:30:15 +03:00
parent 519fd83211
commit f12b01582d

View file

@ -2791,6 +2791,9 @@ Whether we update the buffer is based on `completion-eager-display' and
`eager-display' and `eager-update'.
If FORCE-EAGER-UPDATE is non-nil, we only check eager-display."
(when (and force-eager-update completions--background-update-timer)
(cancel-timer completions--background-update-timer)
(setq completions--background-update-timer nil))
(unless completions--background-update-timer
(setq completions--background-update-timer
(run-with-idle-timer
@ -2811,7 +2814,10 @@ has been requested by the completion table."
(when completion-auto-deselect
(with-selected-window window
(completions--deselect))))
(completions--start-background-update)))
(when (or completion-in-region-mode
(completions--should-show-p
(completion--field-metadata (minibuffer-prompt-end))))
(completions--start-background-update))))
(defun minibuffer-completion-help (&optional start end)
"Display a list of possible completions of the current minibuffer contents."