]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't force completion recalculation in icomplete-fido-ret
authorJoão Távora <joaotavora@gmail.com>
Wed, 25 Dec 2019 17:57:20 +0000 (17:57 +0000)
committerJoão Távora <joaotavora@gmail.com>
Tue, 31 Dec 2019 13:31:45 +0000 (13:31 +0000)
Besides the adverse effect of delaying completions, it tripped up the
useful logic of icomplete-force-complete-and-exit in the case where a
default was available, but no completions calculated yet.

* lisp/icomplete.el (icomplete-fido-ret): Don't force calculation
of completions.

(cherry picked from commit 13778aa5be7bf028893672d84c2a291f491d8216)

lisp/icomplete.el

index 5126c035de13f9fa1bf94d67d4d9d575087d7eee..3b3cabb890e71f5bc32855c243c2fbf03c8a18ce 100644 (file)
@@ -276,15 +276,13 @@ require user confirmation."
   (interactive)
   (let* ((dir (and (eq (icomplete--category) 'file)
                    (file-name-directory (icomplete--field-string))))
-         (current (car (completion-all-sorted-completions)))
+         (current (car completion-all-sorted-completions))
          (probe (and dir current
                      (expand-file-name (directory-file-name current) dir))))
     (cond ((and probe (file-directory-p probe) (not (string= current "./")))
            (icomplete-force-complete))
-          (current
-           (icomplete-force-complete-and-exit))
           (t
-           (exit-minibuffer)))))
+           (icomplete-force-complete-and-exit)))))
 
 (defun icomplete-fido-backward-updir ()
   "Delete char before or go up directory, like `ido-mode'."