GNU bug report logs -
#22097
Ispell: lazy highlighting doesn't work properly.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Sat, 5 Dec 2015 11:41:02 UTC
Severity: normal
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Another limitation is limiting lazy-highlighting by reg-start/reg-end
> instead of a wider area of window-start/window-end.
This patch addresses this limitation: it limits the highlighting area
either to the region boundaries, or to the window boundaries.
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index aa51446..82c589d 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2786,6 +2786,8 @@ ispell-highlight-spelling-error-xemacs
;;(sit-for 0)
)
+(defvar ispell-reg-start nil)
+(defvar ispell-reg-end nil)
(defun ispell-highlight-spelling-error-overlay (start end &optional highlight)
"Highlight the word from START to END using overlays.
@@ -2815,8 +2817,8 @@ ispell-highlight-spelling-error-overlay
(isearch-other-end start)
(isearch-error nil))
(isearch-lazy-highlight-new-loop
- (if (boundp 'reg-start) reg-start)
- (if (boundp 'reg-end) reg-end)))
+ (if (not (eq ispell-reg-start (point-min))) ispell-reg-start (window-start))
+ (if (not (eq ispell-reg-end (point-max))) ispell-reg-end (window-end))))
(lazy-highlight-cleanup lazy-highlight-cleanup)
(setq isearch-lazy-highlight-last-string nil))))
@@ -3211,6 +3213,7 @@ ispell-region
amount for last line processed."
(interactive "r") ; Don't flag errors on read-only bufs.
(ispell-set-spellchecker-params) ; Initialize variables and dicts alists
+ (setq ispell-reg-start reg-start ispell-reg-end reg-end)
(if (not recheckp)
(ispell-accept-buffer-local-defs)) ; set up dictionary, local words, etc.
(let ((skip-region-start (make-marker))
This bug report was last modified 4 years and 256 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.