bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56848: CC Mode fontification bug


From: Gregory Heytings
Subject: bug#56848: CC Mode fontification bug
Date: Sun, 31 Jul 2022 00:16:37 +0000


Recipe:

emacs -Q
C-x C-f src/xdisp.c RET
M-g c 28 RET
;; take note of the word there: "window"
M-: (get-char-property 28 'fontified) RET
;; observe that this returns t
M-g g 800 RET
C-v
M-: (get-char-property 28 'fontified) RET
;; observe that this returns nil, because "struct window" is now visible

This is a BUG.

When font locking has put a fontified property and one of the font-lock-*-faces on characters in the buffer, a mode should not undo that unless it has a very good reason to do so. Otherwise scrolling again through an already fontified buffer calls fontification functions again without reason.

Patch attached.

With the patch, scrolling again through an already fontified buffer is ~25% faster.

Attachment: Be-conservative-with-occurrences-of-newly-found-types.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]