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

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

[elpa] master eb43e4a 10/31: ivy.el (ivy-alt-done): Treat `ivy-text' wit


From: Oleh Krehel
Subject: [elpa] master eb43e4a 10/31: ivy.el (ivy-alt-done): Treat `ivy-text' with ":" verbatim
Date: Fri, 01 May 2015 14:28:47 +0000

branch: master
commit eb43e4a5096462bd819c61ef54903ac9a038b60a
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-alt-done): Treat `ivy-text' with ":" verbatim
    
    * ivy.el (ivy-alt-done): Should work better now for ssh: stuff.
    
    It should be possible to type in any directory: `/ssh:address@hidden:`
    <kbd>C-j</kbd> and get completion.
    
    Re #59
---
 ivy.el |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/ivy.el b/ivy.el
index eea4016..a696d5b 100644
--- a/ivy.el
+++ b/ivy.el
@@ -228,11 +228,15 @@ When ARG is t, exit with current text, ignoring the 
candidates."
       (ivy-immediate-done)
     (let (dir)
       (if (and ivy--directory
-               (not (string= ivy--current "./"))
-               (cl-plusp ivy--length)
-               (file-directory-p
-                (setq dir (expand-file-name
-                           ivy--current ivy--directory))))
+               (or
+                (and
+                 (not (string= ivy--current "./"))
+                 (cl-plusp ivy--length)
+                 (file-directory-p
+                  (setq dir (expand-file-name
+                             ivy--current ivy--directory))))
+                (prog1 (string-match ":" ivy-text)
+                  (setq dir ivy-text))))
           (progn
             (ivy--cd dir)
             (ivy--exhibit))



reply via email to

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