aboutsummaryrefslogtreecommitdiff
path: root/evil-search.el
diff options
context:
space:
mode:
authorEivind Fonn <evfonn@gmail.com>2019-12-31 11:54:40 +0100
committerEivind Fonn <evfonn@gmail.com>2019-12-31 11:54:40 +0100
commitecc86e4bb17d6f9f7bda34d75abbed1a9fae4757 (patch)
tree59d6c58c7f844c570009ef15268be196c6a8edbe /evil-search.el
parent30e951fd41ae408fab7fc19004f88c31205c0e4a (diff)
Revert "Fix bounds of wrapped search"
This reverts commit e47db185aa3e6a15eba6e34847f0b28aa7055db8.
Diffstat (limited to 'evil-search.el')
-rw-r--r--evil-search.el10
1 files changed, 2 insertions, 8 deletions
diff --git a/evil-search.el b/evil-search.el
index 51ac361..31a63f6 100644
--- a/evil-search.el
+++ b/evil-search.el
@@ -191,16 +191,10 @@ of the buffer."
result)
(setq result (funcall search-fun string bound
,(if wrap t 'noerror) count))
- ;; Wrap the search only if a result was not found, and a bound not set
- (when (and ,wrap (null result) (null bound))
+ (when (and ,wrap (null result))
(goto-char ,(if forward '(point-min) '(point-max)))
(unwind-protect
- ;; The wrapped search is bounded by the original starting point
- (setq result (funcall search-fun string
- ,(if forward
- '(max (point-min) (1- start))
- '(min (point-max) (1+ start)))
- noerror count))
+ (setq result (funcall search-fun string bound noerror count))
(unless result
(goto-char start))))
result)))