emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra 796220b 357/395: ivy.el (ivy-alt-done): Exten


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 796220b 357/395: ivy.el (ivy-alt-done): Extend to programmed completion
Date: Thu, 25 Feb 2021 08:32:38 -0500 (EST)

branch: externals/ivy-hydra
commit 796220ba73e235129babdc5e1428b52926781538
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    ivy.el (ivy-alt-done): Extend to programmed completion
---
 ivy.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ivy.el b/ivy.el
index ed5f6aa..f52a9c3 100644
--- a/ivy.el
+++ b/ivy.el
@@ -931,6 +931,12 @@ Is is a cons cell, related to 
`tramp-get-completion-function'."
   "Customize what `ivy-alt-done' does per-collection."
   :type '(alist :key-type symbol :value-type function))
 
+(defun ivy--completing-fname-p ()
+  (eq 'file (cdr (assoc
+                  'category
+                  (ignore-errors
+                    (funcall (ivy-state-collection ivy-last) ivy-text nil 
'metadata))))))
+
 (defun ivy-alt-done (&optional arg)
   "Exit the minibuffer with the selected candidate.
 When ARG is t, exit with current text, ignoring the candidates.
@@ -944,6 +950,8 @@ of exiting.  This function is otherwise like `ivy-done'."
            (ivy-immediate-done))
           ((setq alt-done-fn (ivy-alist-setting ivy-alt-done-functions-alist))
            (funcall alt-done-fn))
+          ((ivy--completing-fname-p)
+           (ivy--directory-done))
           (t
            (ivy-done)))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]