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

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

[elpa] master 1ef7e18 62/90: "M-i" should not switch directories


From: Oleh Krehel
Subject: [elpa] master 1ef7e18 62/90: "M-i" should not switch directories
Date: Tue, 30 Jun 2015 07:28:52 +0000

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

    "M-i" should not switch directories
    
    ivy.el (ivy-insert-current): When the current candidate is a directory,
    just insert its name without the last "/". The user can insert "/" to
    switch to that directory if necessary.
    
    Re #141
---
 ivy.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index 615b476..08b6528 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1409,8 +1409,10 @@ BUFFER may be a string or nil."
 Don't finish completion."
   (interactive)
   (delete-minibuffer-contents)
-  (insert ivy--current)
-  (ivy--cd-maybe))
+  (if (and ivy--directory
+           (string-match "/$" ivy--current))
+      (insert (substring ivy--current 0 -1))
+    (insert ivy--current)))
 
 (defun ivy-toggle-fuzzy ()
   "Toggle the re builder between `ivy--regex-fuzzy' and `ivy--regex-plus'."



reply via email to

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