branch: master commit 1ef7e1845e2208f34cc5176c1d7d5fa1f2eb7817 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
"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'."