Commit 210e592e authored by João Távora's avatar João Távora

Avoid cycling in minibuffer-force-complete-and-exit (bug#34116)

* lisp/minibuffer.el (minibuffer-force-complete-and-exit): Check
completion-cycling before minibuffer-force-complete.
parent d9779c37
......@@ -1257,7 +1257,13 @@ scroll the window of possible completions."
(defun minibuffer-force-complete-and-exit ()
"Complete the minibuffer with first of the matches and exit."
;; If `completion-cycling' is t, then surely a
;; `minibuffer-force-complete' has already executed. This is not
;; just for speed: the extra rotation caused by the second
;; unnecessary call would mess up the final result value
;; (bug#34116).
(unless completion-cycling
(minibuffer-prompt-end) (point-max) #'exit-minibuffer
;; If the previous completion completed to an element which fails
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment