[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master e58231e 033/184: ivy.el (ivy-immediate-done): Fix for when
From: |
Oleh Krehel |
Subject: |
[elpa] master e58231e 033/184: ivy.el (ivy-immediate-done): Fix for when "C-j" changed cwd |
Date: |
Wed, 16 Oct 2019 13:14:43 -0400 (EDT) |
branch: master
commit e58231e7446bc7a1623ad92190080a4180a07f50
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-immediate-done): Fix for when "C-j" changed cwd
* ivy-test.el (ivy-read-directory-name): Add test.
Fixes #2165
---
ivy-test.el | 8 +++++++-
ivy.el | 8 ++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/ivy-test.el b/ivy-test.el
index 10bf189..2a9931b 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -940,7 +940,13 @@ will bring the behavior in line with the newer Emacsen."
(ivy-with
'(read-directory-name "cd: ")
"C-M-j"
- :dir "/tmp"))))
+ :dir "/tmp")))
+ (should
+ (equal "/tmp/"
+ (ivy-with
+ '(read-directory-name "cd: ")
+ "tmp C-j C-M-j"
+ :dir "/"))))
(ert-deftest ivy-partial-files ()
(when (file-exists-p "/tmp/ivy-partial-test")
diff --git a/ivy.el b/ivy.el
index c24bcd7..06fde10 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1125,8 +1125,12 @@ If the text hasn't changed as a result, forward to
`ivy-alt-done'."
((and (string= ivy-text "")
(eq (ivy-state-collection ivy-last)
#'read-file-name-internal))
- (or (copy-sequence (ivy-state-def ivy-last))
- ivy--directory))
+ (if (ivy-state-def ivy-last)
+ (if (> (length ivy--directory)
+ (1+ (length (expand-file-name (ivy-state-def
ivy-last)))))
+ ivy--directory
+ (copy-sequence (ivy-state-def ivy-last)))
+ ivy--directory))
(t
(expand-file-name ivy-text ivy--directory))))
(insert (ivy-state-current ivy-last))
- [elpa] master 9c4cdb7 025/184: swiper.el (swiper-isearch-action): Fix for ivy-occur, (continued)
- [elpa] master 9c4cdb7 025/184: swiper.el (swiper-isearch-action): Fix for ivy-occur, Oleh Krehel, 2019/10/16
- [elpa] master ed1ba4e 028/184: Makefile (deps): Add target, Oleh Krehel, 2019/10/16
- [elpa] master b5e869e 026/184: swiper.el (swiper--occur-cands): Fix wgrep, Oleh Krehel, 2019/10/16
- [elpa] master 6928beb 031/184: ivy-test.el (ivy-read-file-name-in-buffer-visiting-file): Passes, Oleh Krehel, 2019/10/16
- [elpa] master 35415e3 027/184: ivy-test.el (ivy-swiper-wgrep): Add test, Oleh Krehel, 2019/10/16
- [elpa] master fb78c3f 045/184: swiper.el: Run ispell-comments-and-strings, Oleh Krehel, 2019/10/16
- [elpa] master ae3576a 037/184: swiper.el (swiper-isearch): Fix scroll on RET, Oleh Krehel, 2019/10/16
- [elpa] master c4e0b0b 032/184: ivy-test.el (ivy-read-file-name-make-directory): Add, Oleh Krehel, 2019/10/16
- [elpa] master fdd2178 042/184: ivy.el (ivy--magic-tilde-directory): Use "~~" to move to local home, Oleh Krehel, 2019/10/16
- [elpa] master a9196a2 035/184: counsel.el (counsel-file-jump-args): Is now a list, Oleh Krehel, 2019/10/16
- [elpa] master e58231e 033/184: ivy.el (ivy-immediate-done): Fix for when "C-j" changed cwd,
Oleh Krehel <=
- [elpa] master 0132ced 044/184: counsel.el: Run ispell-comments-and-strings, Oleh Krehel, 2019/10/16
- [elpa] master c4842ec 043/184: Fix typo: 'beggining', Oleh Krehel, 2019/10/16
- [elpa] master 28e9416 052/184: ivy.el (ivy--input): Fix for ediff, Oleh Krehel, 2019/10/16
- [elpa] master dd3e1c9 038/184: swiper.el (swiper--maybe-recenter): Refactor, Oleh Krehel, 2019/10/16
- [elpa] master 5ff5139 051/184: ivy.el (ivy-read-action-function): Allow to read actions using Ivy, Oleh Krehel, 2019/10/16
- [elpa] master e4e0ec4 049/184: counsel.el (counsel--file-name-filter): Return "cat" on empty input, Oleh Krehel, 2019/10/16
- [elpa] master 17d9c70 036/184: counsel.el (counsel--find-return-list): Re-use counsel--call, Oleh Krehel, 2019/10/16
- [elpa] master 44c4bab 057/184: Restore use-ignore setting on ivy-resume, Oleh Krehel, 2019/10/16
- [elpa] master d3e4514 063/184: Remove obsolete aliases older than one year, Oleh Krehel, 2019/10/16
- [elpa] master 0be5b58 067/184: ivy.el (ivy-partial): Don't rely on subr-x, Oleh Krehel, 2019/10/16