aboutsummaryrefslogtreecommitdiff
path: root/evil-search.el
diff options
context:
space:
mode:
authorHerbert Jones <jones.herbert@gmail.com>2014-12-05 21:42:56 -0600
committerHerbert Jones <jones.herbert@gmail.com>2014-12-05 21:42:56 -0600
commit77ef1d45c1511c1ed2770d7705a8673e52339ba7 (patch)
treea1060ded6a0dc40cdcf2711c33fdcdfe819ca1b9 /evil-search.el
parentbf6092f44c2aa6517962b7aac017d94d67d90d4e (diff)
evil-search-word-forward should save search in ring on failure
To match the behavior of vim, when doing a search by "*" or "#", if the search fails, the searched word should still appear in the search ring.
Diffstat (limited to 'evil-search.el')
-rw-r--r--evil-search.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/evil-search.el b/evil-search.el
index e35d95d..f75c043 100644
--- a/evil-search.el
+++ b/evil-search.el
@@ -229,14 +229,14 @@ one more than the current position."
(set-text-properties 0 (length string) nil string)
;; position to search from
(goto-char start)
+ (setq isearch-string string)
+ (isearch-update-ring string regexp-p)
(condition-case nil
(funcall search-func string)
(search-failed
(goto-char orig)
(user-error "\"%s\": %s not found"
string (if regexp-p "pattern" "string"))))
- (setq isearch-string string)
- (isearch-update-ring string regexp-p)
;; handle opening and closing of invisible area
(cond
((boundp 'isearch-filter-predicates)