branch: externals/ivy-hydra
commit f42723ea1e4ddef1ec3088ea8ec92d302990d744
Author: Hong Xu <[email protected]>
Commit: Oleh Krehel <[email protected]>

    ivy.el (ivy-done): Let it go through the rest of conditions if confirmation 
is not required.
    
    Fixes #1631
    Fixes #1679
    Fixes #2325
---
 ivy.el | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/ivy.el b/ivy.el
index 3a0ea63..304b70c 100644
--- a/ivy.el
+++ b/ivy.el
@@ -791,14 +791,13 @@ candidate, not the prompt."
                ;; candidate at all
                (eq this-command 'ivy-dispatching-done))
            (ivy--done (ivy-state-current ivy-last)))
-          ((memq (ivy-state-collection ivy-last)
-                 '(read-file-name-internal internal-complete-buffer))
-           (if (or (not (eq confirm-nonexistent-file-or-buffer t))
-                   (equal " (confirm)" ivy--prompt-extra))
-               (ivy--done ivy-text)
-             (setq ivy--prompt-extra " (confirm)")
-             (insert ivy-text)
-             (ivy--exhibit)))
+          ((and (memq (ivy-state-collection ivy-last)
+                      '(read-file-name-internal internal-complete-buffer))
+                (eq confirm-nonexistent-file-or-buffer t)
+                (not (string= " (confirm)" ivy--prompt-extra)))
+           (setq ivy--prompt-extra " (confirm)")
+           (insert ivy-text)
+           (ivy--exhibit))
           ((memq (ivy-state-require-match ivy-last)
                  '(nil confirm confirm-after-completion))
            (ivy--done ivy-text))

Reply via email to