[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 73d9f4a 083/184: Place cursor at the begging of matches (f
From: |
Oleh Krehel |
Subject: |
[elpa] master 73d9f4a 083/184: Place cursor at the begging of matches (for grep) |
Date: |
Wed, 16 Oct 2019 13:14:53 -0400 (EDT) |
branch: master
commit 73d9f4a4f40c08aba4c442bf2093a306f016a367
Author: Campbell Barton <address@hidden>
Commit: Oleh Krehel <address@hidden>
Place cursor at the begging of matches (for grep)
The cursor was being placed after the matches, adding an extra step if
you need to operate on the word, after opening the file with a match.
Fixes #2209
---
counsel.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/counsel.el b/counsel.el
index 038bb8b..5c94bcb 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1372,6 +1372,8 @@ Typical value: '(recenter)."
(goto-char (point-min))
(forward-line (1- (string-to-number line-number)))
(re-search-forward (ivy--regex ivy-text t) (line-end-position) t)
+ (when swiper-goto-start-of-match
+ (goto-char (match-beginning 0)))
(swiper--ensure-visible)
(run-hooks 'counsel-grep-post-action-hook)
(unless (eq ivy-exit 'done)
@@ -2985,6 +2987,8 @@ substituted by the search regexp and file, respectively.
Neither
(forward-line (1- line-number)))
(setq counsel-grep-last-line line-number)
(re-search-forward (ivy--regex ivy-text t) (line-end-position) t)
+ (when swiper-goto-start-of-match
+ (goto-char (match-beginning 0)))
(run-hooks 'counsel-grep-post-action-hook)
(if (eq ivy-exit 'done)
(swiper--ensure-visible)
- [elpa] master 464875a 103/184: counsel.el (counsel-mark-ring): Refactor for reducing nested let, (continued)
- [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, 2019/10/16
- [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 <=
- [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
- [elpa] master 3be5e78 084/184: counsel.el (counsel-git-grep-action): Check re-search-forward, Oleh Krehel, 2019/10/16
- [elpa] master 4c1f6cd 094/184: ivy-test.el: Update, Oleh Krehel, 2019/10/16
- [elpa] master 47f6427 105/184: counsel.el (counsel-compile): favour project root over default-directory, Oleh Krehel, 2019/10/16
- [elpa] master 09507fc 109/184: counsel.el (counsel-mark-ring): Fix highlight line of selected candidate, Oleh Krehel, 2019/10/16
- [elpa] master 46db1b9 107/184: counsel.el (counsel-mark-ring): Add customize variable to sort or not, Oleh Krehel, 2019/10/16
- [elpa] master c0aa563 112/184: ivy.el (ivy-occur): Set up next-error-function, Oleh Krehel, 2019/10/16
- [elpa] master 1a74a21 110/184: ivy-occur: setup for next-error., Oleh Krehel, 2019/10/16
- [elpa] master 30adc93 115/184: Add actions to counsel-switch-buffer, Oleh Krehel, 2019/10/16