[Top][All Lists]

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

[elpa] master f628569 127/184: Make ivy--magic-file-slash less aggressiv

From: Oleh Krehel
Subject: [elpa] master f628569 127/184: Make ivy--magic-file-slash less aggressive
Date: Wed, 16 Oct 2019 13:15:05 -0400 (EDT)

branch: master
commit f628569fa3600aa0e7ccbf38662d8636a570eb77
Author: Mitchell Plamann <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Make ivy--magic-file-slash less aggressive
    In counsel-find-file, when the user types "foo", selects the prompt, and
    presses "/", the result should be "foo/".
    If the directory "foobar" exists, but "foo" does not, typing "foo",
    selecting the prompt, and pressing "/" results in "cd"ing to "foobar"
    (assuming ivy-magic-slash-non-match-action is
    'ivy-magic-slash-non-match-cd-selected). This commit changes
    ivy--magic-file-slash to check that the prompt is not selected before
    performing the ivy-magic-slash-non-match-cd-selected action.
    Fixes #2240
 ivy.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ivy.el b/ivy.el
index 05d8803..fc1df4c 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3016,6 +3016,7 @@ Possible choices are 
                (and (or (> ivy--index 0)
                         (= ivy--length 1)
+                    (not (ivy--prompt-selected-p))
                     (not (equal (ivy-state-current ivy-last) ""))
                     (file-directory-p (ivy-state-current ivy-last))
                     (or (eq ivy-magic-slash-non-match-action

reply via email to

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