branch: master commit d466ade1987a9e0e581e3051b773f06e4b74cf0f Author: Greg Lucas <g...@glucas.net> Commit: Greg Lucas <g...@glucas.net>
Match drive letter at start of current directory When looking for the root of the current drive, make sure we only match a drive letter at the beginning of the path. --- ivy.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ivy.el b/ivy.el index d0e0573..55a23e9 100644 --- a/ivy.el +++ b/ivy.el @@ -1151,7 +1151,7 @@ Should be run via minibuffer `post-command-hook'." (ivy--cd (expand-file-name ivy-text ivy--directory)) (when (string-match "//\\'" ivy-text) (if (and default-directory - (string-match "[[:alpha:]]:/" default-directory)) + (string-match "\\`[[:alpha:]]:/" default-directory)) (ivy--cd (match-string 0 default-directory)) (ivy--cd "/"))) (when (string-match "[[:alpha:]]:/" ivy-text)