diff options
| author | Juri Linkov | 2014-12-16 01:45:12 +0200 |
|---|---|---|
| committer | Juri Linkov | 2014-12-16 01:45:12 +0200 |
| commit | 10ec0468dfbc0815a772cc46a031aca298af0985 (patch) | |
| tree | 060acbdf55d70429764b4c5759d79991a08ec959 | |
| parent | 255132f6f48e3fd52d5d5ece61653dc603242353 (diff) | |
| download | emacs-10ec0468dfbc0815a772cc46a031aca298af0985.tar.gz emacs-10ec0468dfbc0815a772cc46a031aca298af0985.zip | |
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
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/isearch.el | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 364511c2c15..5a0a62fef68 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-12-15 Juri Linkov <juri@linkov.net> | ||
| 2 | |||
| 3 | * isearch.el (isearch-lazy-highlight-search): Extend the bound of | ||
| 4 | the wrapped search by the length of the search string to be able | ||
| 5 | to lazy-highlight the whole search string at point (bug#19353). | ||
| 6 | |||
| 1 | 2014-12-15 Lars Magne Ingebrigtsen <larsi@gnus.org> | 7 | 2014-12-15 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 8 | ||
| 3 | * net/shr.el (shr-fold-text): Don't bug out on zero-length text. | 9 | * net/shr.el (shr-fold-text): Don't bug out on zero-length text. |
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." | |||
| 3063 | (bound (if isearch-lazy-highlight-forward | 3063 | (bound (if isearch-lazy-highlight-forward |
| 3064 | (min (or isearch-lazy-highlight-end-limit (point-max)) | 3064 | (min (or isearch-lazy-highlight-end-limit (point-max)) |
| 3065 | (if isearch-lazy-highlight-wrapped | 3065 | (if isearch-lazy-highlight-wrapped |
| 3066 | isearch-lazy-highlight-start | 3066 | (+ isearch-lazy-highlight-start |
| 3067 | ;; Extend bound to match whole string at point | ||
| 3068 | (1- (length isearch-lazy-highlight-last-string))) | ||
| 3067 | (window-end))) | 3069 | (window-end))) |
| 3068 | (max (or isearch-lazy-highlight-start-limit (point-min)) | 3070 | (max (or isearch-lazy-highlight-start-limit (point-min)) |
| 3069 | (if isearch-lazy-highlight-wrapped | 3071 | (if isearch-lazy-highlight-wrapped |
| 3070 | isearch-lazy-highlight-end | 3072 | (- isearch-lazy-highlight-end |
| 3073 | ;; Extend bound to match whole string at point | ||
| 3074 | (1- (length isearch-lazy-highlight-last-string))) | ||
| 3071 | (window-start)))))) | 3075 | (window-start)))))) |
| 3072 | ;; Use a loop like in `isearch-search'. | 3076 | ;; Use a loop like in `isearch-search'. |
| 3073 | (while retry | 3077 | (while retry |