Subject: bug#44983: Truncate long lines of grep output

From: Eli Zaretskii <[email-masked]>
Date: Sat, 30 Apr 2022 13:15:07 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Sat, 30 Apr 2022 11:36:37 +0200
> 
> But before I start trying to debug that, I'm wondering: Why is
> `jit-lock-fontify-now' called at all here?  There have been no display
> changes -- the text was inserted, but as invisible text, so no font
> locking should be necessary.

Are you saying that buffer position 392 was in invisible text?  If so,
jit-lock-fontify-now should not have been called.  But if position 392
is visible, then what you see is expected: the buffer text has
changed, and therefore redisplay will arrange to redisplay the buffer.
Part of redisplaying the buffer is making sure the text that might
wind up on display is fontified.  Which part will actually be on
display can only be known _after_ the text is fontified (because
fontification can change faces, and thus affect what's visible in the
window).  So we always fontify the 500-character chunk, per
jit-lock.el's defaults.

Did I answer your question?