]> git.eshelyaron.com Git - emacs.git/commitdiff
Consider empty cached completion input as no input at all
authorEshel Yaron <me@eshelyaron.com>
Thu, 25 Apr 2024 16:15:03 +0000 (18:15 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 25 Apr 2024 16:15:03 +0000 (18:15 +0200)
* lisp/minibuffer.el (minibuffer-restore-completion-input): When
the empty cached completion input is empty, report it as
non-existent.

lisp/minibuffer.el

index e6cc4b7837d2fa38196792f5978305df763c6c9b..a22d73892e943fbc905bb5fe78222755ede8eccf 100644 (file)
@@ -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))))