From f66f7f815a79d24a2e35576a74790b01bf9ed66e Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Thu, 25 Apr 2024 18:15:03 +0200 Subject: [PATCH] Consider empty cached completion input as no input at all * lisp/minibuffer.el (minibuffer-restore-completion-input): When the empty cached completion input is empty, report it as non-existent. --- lisp/minibuffer.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index e6cc4b7837d..a22d73892e9 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2112,7 +2112,7 @@ Interactively, ARG is the prefix argument, and it defaults to 1." (base-size (length base)) (prompt-end (minibuffer-prompt-end))) (setq completion--input nil) - (unless (and string (<= (+ prompt-end base-size) (point-max)) + (unless (and string (< (+ prompt-end base-size) (point-max)) ;; Don't restore if the base part has changed. (equal base (buffer-substring-no-properties prompt-end (+ prompt-end base-size)))) -- 2.39.5