diff options
author | Juri Linkov <juri@linkov.net> | 2023-02-09 20:08:15 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2023-02-09 20:08:15 +0200 |
commit | 8784b9e817e434a13aba68006732d65962dec128 (patch) | |
tree | 74a83c18e039c6aca0a8eeb6bddb6c33cb27bdea /lisp/icomplete.el | |
parent | 1518fc5d7c5bedbbe35053696c7ec06020c81b05 (diff) | |
download | emacs-8784b9e817e434a13aba68006732d65962dec128.tar.gz |
* lisp/icomplete.el (icomplete-exhibit): Check validity of the current buffer.
This function is applicable only in buffers where functions like
icomplete--field-beg can be called, and they expects either non-nil
completion-in-region--data or window-minibuffer-p (bug#61308).
Diffstat (limited to 'lisp/icomplete.el')
-rw-r--r-- | lisp/icomplete.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 014f38b2024..f7a91599f3b 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -686,11 +686,13 @@ If it's on, just add the vertical display." Should be run via minibuffer `post-command-hook'. See `icomplete-mode' and `minibuffer-setup-hook'." (when (and icomplete-mode + ;; Check if still in the right buffer (bug#61308) + (or (window-minibuffer-p) completion-in-region--data) (icomplete-simple-completing-p)) ;Shouldn't be necessary. (let ((saved-point (point))) (save-excursion (goto-char (icomplete--field-end)) - ; Insert the match-status information: + ;; Insert the match-status information: (when (and (or icomplete-show-matches-on-no-input (not (equal (icomplete--field-string) icomplete--initial-input))) |