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

    ivy.el (ivy--update-history): Use ivy-state-current for file names
    
    This will put the full file path on `file-name-history'.
    
    Fixes #2565
---
 ivy.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index cf7141d..8587a79 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2355,7 +2355,8 @@ customizations apply to the current completion session."
          (if (or (string= ivy-text "")
                  (eq
                   (plist-get (ivy-state-extra-props ivy-last) :caller)
-                  'ivy-completing-read))
+                  'ivy-completing-read)
+                 (eq (ivy-state-history ivy-last) 'file-name-history))
              (ivy-state-current ivy-last)
            ivy-text)))
     (cond ((equal item ""))

Reply via email to