mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Merge from savannah/emacs-30
2d5cf22818Fix clipboard object handle leak on Android 3.1 to 11.0b6b4a080a3Only disable 'completion-preview-active-mode' when it is on
This commit is contained in:
commit
a07465410a
2 changed files with 19 additions and 9 deletions
|
|
@ -615,14 +615,18 @@ point, otherwise hide it."
|
|||
(cancel-timer completion-preview--timer)
|
||||
(setq completion-preview--timer nil))
|
||||
|
||||
;; If we're called after a command that itself updates the
|
||||
;; preview, don't do anything.
|
||||
(unless internal-p
|
||||
(if (and (completion-preview-require-certain-commands)
|
||||
(completion-preview-require-minimum-symbol-length)
|
||||
(not buffer-read-only))
|
||||
(completion-preview--show)
|
||||
(completion-preview-active-mode -1)))))
|
||||
(cond
|
||||
(internal-p
|
||||
;; `this-command' took care of updating the preview. Do nothing.
|
||||
)
|
||||
((and (completion-preview-require-certain-commands)
|
||||
(completion-preview-require-minimum-symbol-length)
|
||||
(not buffer-read-only))
|
||||
;; All conditions met. Show or update the preview.
|
||||
(completion-preview--show))
|
||||
(completion-preview-active-mode
|
||||
;; The preview is shown, but it shouldn't be. Hide it.
|
||||
(completion-preview-active-mode -1)))))
|
||||
|
||||
(defun completion-preview--barf-if-no-preview ()
|
||||
"Signal a `user-error' if completion preview is not active."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue