[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master cb0cf02 35/63: ivy.el (ivy-call): Remove with-selected-win
From: |
Oleh Krehel |
Subject: |
[elpa] master cb0cf02 35/63: ivy.el (ivy-call): Remove with-selected-window |
Date: |
Fri, 21 Aug 2015 12:08:40 +0000 |
branch: master
commit cb0cf0258dd59bf1bc00eba6bd6c23e3cbaefb8b
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-call): Remove with-selected-window
* counsel.el (counsel-git-grep-action): Add with-selected-window.
* ivy.el (ivy-dispatching-done): Remove trailing ": ".
(ivy-switch-buffer): Add extra action "j" calls
`switch-to-buffer-other-window'. The change `ivy-dispatching-done' had
to be done because of this.
---
counsel.el | 21 +++++++++++----------
ivy.el | 16 +++++++++-------
2 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/counsel.el b/counsel.el
index 15a14db..e892c3e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -310,16 +310,17 @@
(defun counsel-git-grep-action (x)
(when (string-match "\\`\\(.*?\\):\\([0-9]+\\):\\(.*\\)\\'" x)
- (let ((file-name (match-string-no-properties 1 x))
- (line-number (match-string-no-properties 2 x)))
- (find-file (expand-file-name file-name counsel--git-grep-dir))
- (goto-char (point-min))
- (forward-line (1- (string-to-number line-number)))
- (re-search-forward (ivy--regex ivy-text t) (line-end-position) t)
- (unless (eq ivy-exit 'done)
- (setq swiper--window (selected-window))
- (swiper--cleanup)
- (swiper--add-overlays (ivy--regex ivy-text))))))
+ (with-selected-window (ivy-state-window ivy-last)
+ (let ((file-name (match-string-no-properties 1 x))
+ (line-number (match-string-no-properties 2 x)))
+ (find-file (expand-file-name file-name counsel--git-grep-dir))
+ (goto-char (point-min))
+ (forward-line (1- (string-to-number line-number)))
+ (re-search-forward (ivy--regex ivy-text t) (line-end-position) t)
+ (unless (eq ivy-exit 'done)
+ (setq swiper--window (selected-window))
+ (swiper--cleanup)
+ (swiper--add-overlays (ivy--regex ivy-text)))))))
(defvar counsel-git-grep-history nil
"History for `counsel-git-grep'.")
diff --git a/ivy.el b/ivy.el
index 989a34e..28463b7 100644
--- a/ivy.el
+++ b/ivy.el
@@ -286,7 +286,7 @@ When non-nil, it should contain one %d.")
(nth 2 x)))
(cdr actions)
"\n")
- "\n: "))
+ "\n"))
(key (string (read-key hint)))
(action (assoc key (cdr actions))))
(cond ((string= key ""))
@@ -578,11 +578,10 @@ If the input is empty, select the previous history
element instead."
(x (if (and (consp collection)
(consp (car collection)))
(cdr (assoc ivy--current collection))
- ivy--current)))
- (if (eq (ivy-state-history ivy-last) 'extended-command-history)
- (funcall action x)
- (with-selected-window (ivy-state-window ivy-last)
- (funcall action x)))))))
+ (if (equal ivy--current "")
+ ivy-text
+ ivy--current))))
+ (funcall action x)))))
(defun ivy-next-line-and-call (&optional arg)
"Move cursor vertically down ARG candidates.
@@ -1559,7 +1558,10 @@ BUFFER may be a string or nil."
(lambda (x)
(kill-buffer x)
(ivy--reset-state ivy-last))
- "kill")))
+ "kill")
+ ("j"
+ switch-to-buffer-other-window
+ "other")))
(defun ivy-switch-buffer ()
"Switch to another buffer."
- [elpa] master 1092e2d 24/63: swiper.el: Update avy--goto -> avy-action-goto, (continued)
- [elpa] master 1092e2d 24/63: swiper.el: Update avy--goto -> avy-action-goto, Oleh Krehel, 2015/08/21
- [elpa] master adad288 27/63: ivy.el (ivy-call): Add selected-window work-around for M-x, Oleh Krehel, 2015/08/21
- [elpa] master 9ca6f48 30/63: Allow "C-g" to interrupt ivy-dispatching-done, Oleh Krehel, 2015/08/21
- [elpa] master 5480079 28/63: ivy.el (ivy-dispatching-done): New command on "M-o", Oleh Krehel, 2015/08/21
- [elpa] master 6062903 21/63: ivy.el (ivy-count-format): Improve docstring, Oleh Krehel, 2015/08/21
- [elpa] master e91a4eb 31/63: ivy.el (ivy-dispatching-done): Display the candidate, Oleh Krehel, 2015/08/21
- [elpa] master 3464362 33/63: Add actions for counsel-describe-variable, Oleh Krehel, 2015/08/21
- [elpa] master 31d664a 32/63: ivy.el (ivy-dispatching-done): Add a trailing newline, Oleh Krehel, 2015/08/21
- [elpa] master 107ebff 34/63: Add actions for counsel-describe-function, Oleh Krehel, 2015/08/21
- [elpa] master 2fbcfb9 29/63: ivy.el (ivy--preselect-index): Add matcher to arglist, Oleh Krehel, 2015/08/21
- [elpa] master cb0cf02 35/63: ivy.el (ivy-call): Remove with-selected-window,
Oleh Krehel <=
- [elpa] master 08bd5b4 25/63: counsel.el (counsel-variable-list): Add, Oleh Krehel, 2015/08/21
- [elpa] master ae77d93 36/63: counsel.el (counsel-org-tag): Replace org-set-tags, Oleh Krehel, 2015/08/21
- [elpa] master 1e483c5 37/63: Fixup counsel-org-tag, Oleh Krehel, 2015/08/21
- [elpa] master a9ff1f1 38/63: counsel.el (counsel-org-change-tags): Improve removing tags, Oleh Krehel, 2015/08/21
- [elpa] master 5ae677c 41/63: Simplify counsel-git-grep logic, Oleh Krehel, 2015/08/21
- [elpa] master c1b9f5a 39/63: Allow "M-o j" to switch to virtual buffers in other window, Oleh Krehel, 2015/08/21
- [elpa] master f71a562 40/63: Fix "DEL" generating a "Quit" sometimes for counsel-git-grep, Oleh Krehel, 2015/08/21
- [elpa] master 36e8fe3 46/63: counsel.el (counsel-org-tag): No need to be at heading, Oleh Krehel, 2015/08/21
- [elpa] master acf4485 42/63: ivy.el (ivy--exhibit): Check if in post-command-hook, Oleh Krehel, 2015/08/21
- [elpa] master 8a06271 43/63: Update :dynamic-collection to be a boolean, Oleh Krehel, 2015/08/21