[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6905e6c 097/184: counsel.el (counsel--rg-targets): Adjust
From: |
Oleh Krehel |
Subject: |
[elpa] master 6905e6c 097/184: counsel.el (counsel--rg-targets): Adjust for ivy-occur buffers |
Date: |
Wed, 16 Oct 2019 13:14:58 -0400 (EDT) |
branch: master
commit 6905e6cad0042ac673f19e780512530aa36f2a94
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel--rg-targets): Adjust for ivy-occur buffers
When nothing is selected in an ivy-occur buffer (of e.g. `counsel-git'
or `counsel-find-file'), select all files in that buffer. That's not
the same thing as all files in the current directory.
---
counsel.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/counsel.el b/counsel.el
index a614250..ef559be 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2915,8 +2915,14 @@ Note: don't use single quotes for the regex."
(defun counsel--rg-targets ()
"Return a list of files to operate on, based on `dired-mode' marks."
(if (eq major-mode 'dired-mode)
- (let ((files (dired-get-marked-files 'no-dir nil nil t)))
- (if (null (cdr files))
+ (let ((files
+ (dired-get-marked-files 'no-dir nil nil t)))
+ (if (and (null (cdr files))
+ (not (when (string-match-p "\\*ivy-occur" (buffer-name))
+ (dired-toggle-marks)
+ (setq files (dired-get-marked-files 'no-dir))
+ (dired-toggle-marks)
+ t)))
""
(concat
" "
- [elpa] master e41cbec 073/184: ivy.el (ivy-immediate-done): Fix parent dirs for read-directory-name, (continued)
- [elpa] master e41cbec 073/184: ivy.el (ivy-immediate-done): Fix parent dirs for read-directory-name, Oleh Krehel, 2019/10/16
- [elpa] master 3256447 076/184: ivy.el (ivy--partial-cd-for-single-directory): Extract, Oleh Krehel, 2019/10/16
- [elpa] master 03b3f82 075/184: ivy.el (ivy-partial): Use ivy--filter in place of all-completions, Oleh Krehel, 2019/10/16
- [elpa] master daf4683 081/184: ivy.el (ivy--directory-done): Inhibit distracting TRAMP message for /sudo::, Oleh Krehel, 2019/10/16
- [elpa] master 9e03f36 095/184: ivy-test.el: Turn two tests back on, Oleh Krehel, 2019/10/16
- [elpa] master 4b7b075 093/184: ivy-test.el (ivy-test-inhibit-message): Add, Oleh Krehel, 2019/10/16
- [elpa] master 967d046 091/184: ivy-test.el (counsel-yank-pop): Fix on Windows, Oleh Krehel, 2019/10/16
- [elpa] master cfbf481 089/184: Lazy load ffap, Oleh Krehel, 2019/10/16
- [elpa] master 464875a 103/184: counsel.el (counsel-mark-ring): Refactor for reducing nested let, Oleh Krehel, 2019/10/16
- [elpa] master 0c1901e 100/184: ivy.el (ivy--regex-ignore-order): Fix docstring, Oleh Krehel, 2019/10/16
- [elpa] master 6905e6c 097/184: counsel.el (counsel--rg-targets): Adjust for ivy-occur buffers,
Oleh Krehel <=
- [elpa] master e6171e2 098/184: ivy-hydra.el (ivy-dispatching-done-hydra): Fix for ivy-resume, Oleh Krehel, 2019/10/16
- [elpa] master 943eb01 108/184: counsel.el (counsel-mark-ring): Goto actual point instead of line, Oleh Krehel, 2019/10/16
- [elpa] master 36045f7 003/184: doc/Changelog.org: Fixup, Oleh Krehel, 2019/10/16
- [elpa] master 4389a26 056/184: ivy-overlay.el (ivy-overlay-show-after): Check window height better, Oleh Krehel, 2019/10/16
- [elpa] master 1332ab0 068/184: counsel.el (counsel-compile-env-pattern): Fix regex typo, Oleh Krehel, 2019/10/16
- [elpa] master beb3aee 080/184: ivy.el (ivy--directory-done): Handle "/ C-j" on remote, Oleh Krehel, 2019/10/16
- [elpa] master e62e7de 090/184: ivy-test.el (ivy-test-run-tests): Fix, Oleh Krehel, 2019/10/16
- [elpa] master 73d9f4a 083/184: Place cursor at the begging of matches (for grep), Oleh Krehel, 2019/10/16
- [elpa] master 361cf87 070/184: ivy-test.el (counsel-find-file-with-dollars): Remove, Oleh Krehel, 2019/10/16
- [elpa] master 7cca04a 088/184: doc/ivy.org: Document the marking feature, Oleh Krehel, 2019/10/16