From: Eshel Yaron Date: Thu, 25 Apr 2024 16:15:03 +0000 (+0200) Subject: Consider empty cached completion input as no input at all X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f66f7f815a79d24a2e35576a74790b01bf9ed66e;p=emacs.git 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. --- 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))))