]> git.eshelyaron.com Git - emacs.git/commitdiff
; Inhibit completion preview in read-only buffers
authorEshel Yaron <me@eshelyaron.com>
Wed, 21 Aug 2024 09:25:17 +0000 (11:25 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 21 Aug 2024 09:25:17 +0000 (11:25 +0200)
* lisp/completion-preview.el
(completion-preview--post-command): Avoid showing completion
preview if buffer is read-only.

lisp/completion-preview.el

index d8a010a94b7f5f188fe43affc4f8a892b2f3a683..d3e9acb1ed9124c2b658f5fece9323c38a241703 100644 (file)
@@ -534,7 +534,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)))))