[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-visualstar 6e9f2349ad 07/19: This makes visualstar pe
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-visualstar 6e9f2349ad 07/19: This makes visualstar persistent, i.e. one can continue searching the next occurrence(s) of the visual selection by repeatedly hitting '*' or '#'. |
Date: |
Thu, 6 Jan 2022 04:00:20 -0500 (EST) |
branch: elpa/evil-visualstar
commit 6e9f2349ada875699b2a0759632088ae992da93b
Author: Guido Van Hoecke <guivho@gmail.com>
Commit: Guido Van Hoecke <guivho@gmail.com>
This makes visualstar persistent, i.e. one can continue searching the next
occurrence(s) of the visual selection by repeatedly hitting '*' or '#'.
---
evil-visualstar.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/evil-visualstar.el b/evil-visualstar.el
index 1bb76185ec..df596b41d3 100644
--- a/evil-visualstar.el
+++ b/evil-visualstar.el
@@ -48,17 +48,22 @@
(defun evil-visualstar/begin-search (beg end direction)
(when (evil-visual-state-p)
(evil-exit-visual-state)
- (let ((selection (regexp-quote (buffer-substring-no-properties beg end))))
+ (let ((found)
+ (selection (regexp-quote (buffer-substring-no-properties beg end))))
(if (eq evil-search-module 'isearch)
(progn
(setq isearch-forward direction)
- (evil-search selection direction t))
+ (setq found (evil-search selection direction t)))
(let ((pattern (evil-ex-make-search-pattern selection))
(direction (if direction 'forward 'backward)))
(setq evil-ex-search-direction direction)
(setq evil-ex-search-pattern pattern)
(evil-ex-search-activate-highlight pattern)
- (evil-ex-search-next))))))
+ (setq found (evil-ex-search-next))))
+ (when found
+ (push-mark (- (+ end (point)) beg) t)
+ (exchange-point-and-mark)
+ (exchange-point-and-mark)))))
(defun evil-visualstar/begin-search-forward (beg end)
"Search for the visual selection forwards."
- [nongnu] elpa/evil-visualstar 1bb9ecd6f5 02/19: add readme., (continued)
- [nongnu] elpa/evil-visualstar 1bb9ecd6f5 02/19: add readme., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar a18dfe7612 09/19: Merge pull request #5 from andyque/master, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar eb996eca00 17/19: Merge pull request #8 from syohex/update-evil-url, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 06c053d8f7 19/19: should be defined as motions, not commands, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 3f9bb0e6a1 11/19: Allow for option controlled persistent visualstar searches, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 4a93eb8790 04/19: correct package-requires syntax., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar bd9e1b50c0 15/19: Merge pull request #4 from guivho/master, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar ced3ae62e2 08/19: add visualstar search to ex search history and evil search history, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 5a9b40f937 12/19: Added missing quote, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 53d08370af 03/19: minor grammar change., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 6e9f2349ad 07/19: This makes visualstar persistent, i.e. one can continue searching the next occurrence(s) of the visual selection by repeatedly hitting '*' or '#'.,
ELPA Syncer <=
- [nongnu] elpa/evil-visualstar de939b4013 06/19: reimplement as a minor-mode., ELPA Syncer, 2022/01/06