GNU bug report logs -
#20240
25.0.50; CC Mode broken fontification and commenting
Previous Next
Reported by: Mark Oteiza <mvoteiza <at> udel.edu>
Date: Wed, 1 Apr 2015 10:52:01 UTC
Severity: normal
Tags: fixed
Found in version 25.0.50
Fixed in version 25.1
Done: Mark Oteiza <mvoteiza <at> udel.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> - (run-hook-with-args 'jit-lock-after-change-extend-region-functions
> - start end old-len)
> - ;; Make sure we change at least one char (in case of deletions).
> - (setq jit-lock-end (min (max jit-lock-end (1+ start)) (point-max)))
> - ;; Request refontification.
> - (put-text-property jit-lock-start jit-lock-end 'fontified nil))
> + (save-restriction
> + (widen)
> + (run-hook-with-args 'jit-lock-after-change-extend-region-functions
> + start end old-len)
> + ;; Make sure we change at least one char (in case of deletions).
> + (setq jit-lock-end (min (max jit-lock-end (1+ start)) (point-max)))
> + ;; Request refontification.
> + (put-text-property jit-lock-start jit-lock-end 'fontified nil)))
Widening during the call to
jit-lock-after-change-extend-region-functions seems wrong. But I guess
there can be meaningful cases where
jit-lock-after-change-extend-region-functions could return positions
outside of the narrowed region, so I'd be OK with widening during the
subsequent `put-text-property'.
Stefan
This bug report was last modified 9 years and 330 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.