mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
; * lisp/completion-preview.el: Fix race condition.
* lisp/completion-preview.el (completion-preview--update): Bind 'inhibit-quit' to non-nil around completion preview overlay initialization. This binding prevents the surrounding 'while-no-input' from interrupting the overlay initialization, which yields an inconsistent state wherein the overlay is visible but completion-preview-active-mode wasn't enabled.
This commit is contained in:
parent
7856dd557a
commit
9351fad650
1 changed files with 3 additions and 1 deletions
|
|
@ -521,7 +521,9 @@ candidates or if there are multiple matching completions and
|
|||
(run-hook-wrapped
|
||||
'completion-at-point-functions
|
||||
#'completion-preview--capf-wrapper)
|
||||
(when-let* ((suffix (car suffixes)))
|
||||
(when-let* ((suffix (car suffixes))
|
||||
(inhibit-quit t))
|
||||
;; Critical section, do not quit upon receiving input here.
|
||||
(set-text-properties 0 (length suffix)
|
||||
(list 'face (if (cdr suffixes)
|
||||
'completion-preview
|
||||
|
|
|
|||
Loading…
Reference in a new issue