diff options
author | Gerd Moellmann <[email protected]> | 2000-12-15 13:22:21 +0000 |
---|---|---|
committer | Gerd Moellmann <[email protected]> | 2000-12-15 13:22:21 +0000 |
commit | 68ebbb959e5ef9e87cb41dde08397622cf756b3a (patch) | |
tree | f45247506a4d5be304d63cdde8911714ebd04525 | |
parent | 8062e53a7c455bb0d6ff48440e34352b91d0c6d9 (diff) |
(isearch-lazy-highlight-max): New user-option.
(isearch-lazy-highlight-update): Don't highlight more than
isearch-lazy-highlight-max matches.
-rw-r--r-- | lisp/isearch.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index ae5d1cbf0b..86164001dd 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1871,6 +1871,12 @@ If this is nil, extra highlighting can be \"manually\" removed with :type 'number :group 'isearch-lazy-highlight) +(defcustom isearch-lazy-highlight-max 20 + "*Maximum number of matches to highlight." + :type '(choice (const :tag "All" nil) + (integer :tag "Some")) + :group 'isearch-lazy-highlight) + (defgroup isearch-faces nil "Lazy highlighting feature for incremental search." :version "21.1" @@ -1961,7 +1967,10 @@ Attempt to do the search exactly the way the pending isearch would." (defun isearch-lazy-highlight-update () "Find and highlight the next match in the lazy highlighting loop." - (when (not isearch-invalid-regexp) + (when (and (not isearch-invalid-regexp) + (or (null isearch-lazy-highlight-max) + (< (length isearch-lazy-highlight-overlays) + isearch-lazy-highlight-max))) (save-excursion (save-match-data (goto-char (if isearch-forward |