From de30fee62d7c84adf9032be0c91911e7e5fc8d20 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 21 Aug 2024 11:25:17 +0200 Subject: [PATCH] ; Inhibit completion preview in read-only buffers * lisp/completion-preview.el (completion-preview--post-command): Avoid showing completion preview if buffer is read-only. --- lisp/completion-preview.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el index d8a010a94b7..d3e9acb1ed9 100644 --- a/lisp/completion-preview.el +++ b/lisp/completion-preview.el @@ -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))))) -- 2.39.5