diff options
author | Juri Linkov <juri@linkov.net> | 2014-12-16 01:45:12 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2014-12-16 01:45:12 +0200 |
commit | 10ec0468dfbc0815a772cc46a031aca298af0985 (patch) | |
tree | 060acbdf55d70429764b4c5759d79991a08ec959 /lisp/isearch.el | |
parent | 255132f6f48e3fd52d5d5ece61653dc603242353 (diff) | |
download | emacs-10ec0468dfbc0815a772cc46a031aca298af0985.tar.gz |
Lazy-highlight the whole string at point
* lisp/isearch.el (isearch-lazy-highlight-search): Extend the bound of
the wrapped search by the length of the search string to be able
to lazy-highlight the whole search string at point.
Fixes: debbugs:19353
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r-- | lisp/isearch.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index ef0c4a78b89..fde93530cc0 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -3063,11 +3063,15 @@ Attempt to do the search exactly the way the pending Isearch would." (bound (if isearch-lazy-highlight-forward (min (or isearch-lazy-highlight-end-limit (point-max)) (if isearch-lazy-highlight-wrapped - isearch-lazy-highlight-start + (+ isearch-lazy-highlight-start + ;; Extend bound to match whole string at point + (1- (length isearch-lazy-highlight-last-string))) (window-end))) (max (or isearch-lazy-highlight-start-limit (point-min)) (if isearch-lazy-highlight-wrapped - isearch-lazy-highlight-end + (- isearch-lazy-highlight-end + ;; Extend bound to match whole string at point + (1- (length isearch-lazy-highlight-last-string))) (window-start)))))) ;; Use a loop like in `isearch-search'. (while retry |