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

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

[elpa] master cdb2b1a 72/90: Fix the case where file name can contain ~


From: Oleh Krehel
Subject: [elpa] master cdb2b1a 72/90: Fix the case where file name can contain ~
Date: Tue, 30 Jun 2015 07:29:17 +0000

branch: master
commit cdb2b1ae6145e76b1c5b0f7a099ccabc653bb719
Author: Kaushal Modi <address@hidden>
Commit: Kaushal Modi <address@hidden>

    Fix the case where file name can contain ~
    
    - The fix make opening files like init.el~ now possible. Earlier,
      hitting that last ~ char switch the dir to ~/
    - This commit will now make that cd to ~/ only if ~ is the first char in
      the search term
---
 ivy.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index 55a23e9..41e38b5 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1158,7 +1158,7 @@ Should be run via minibuffer `post-command-hook'."
                   (let ((drive-root (match-string 0 ivy-text)))
                     (when (file-exists-p drive-root)
                       (ivy--cd drive-root)))))
-             (if (string-match "~\\'" ivy-text)
+             (if (string-match "\\`~\\'" ivy-text)
                  (ivy--cd (expand-file-name "~/")))))
           ((eq (ivy-state-collection ivy-last) 'internal-complete-buffer)
            (when (or (and (string-match "\\` " ivy-text)



reply via email to

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