; Inhibit completion preview in read-only buffers

* lisp/completion-preview.el
(completion-preview--post-command): Avoid showing completion
preview if buffer is read-only.
This commit is contained in:
Eshel Yaron 2024-08-21 11:25:17 +02:00
parent bd647f3614
commit 5d0e5f0865
No known key found for this signature in database
GPG key ID: EF3EE9CA35D78618

View file

@ -467,7 +467,8 @@ point, otherwise hide it."
;; preview, don't do anything.
(unless internal-p
(if (and (completion-preview-require-certain-commands)
(completion-preview-require-minimum-symbol-length))
(completion-preview-require-minimum-symbol-length)
(not buffer-read-only))
(completion-preview--show)
(completion-preview-active-mode -1)))))