From f0de338a399c4c34a302670ae2006754209a7bf1 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Mon, 21 Mar 2016 14:26:43 +0100 Subject: [PATCH] ivy.el (ivy--directory-done): Fix when ivy-text is a dir But when it's different from `ivy--current'. Fixes #448 --- ivy.el | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ivy.el b/ivy.el index 386f01ce5..ed0f232d5 100644 --- a/ivy.el +++ b/ivy.el @@ -552,14 +552,10 @@ When ARG is t, exit with current text, ignoring the candidates." (setq dir (concat ivy-text ivy--directory)) (ivy--cd dir) (ivy--exhibit)) - ((or - (and - (not (string= ivy-text "")) - (setq dir (ivy-expand-file-if-directory ivy-text))) - (and - (> ivy--length 0) - (not (string= ivy--current "./")) - (setq dir (ivy-expand-file-if-directory ivy--current)))) + ((and + (> ivy--length 0) + (not (string= ivy--current "./")) + (setq dir (ivy-expand-file-if-directory ivy--current))) (ivy--cd dir) (ivy--exhibit)) ((or (and (equal ivy--directory "/") -- 2.39.2