Subject: Re: bug#12600: 24.2.50; linum-mode: line numbers in fringe do not refresh when resizing frame

From: Eli Zaretskii <[email-masked]>
Date: Thu, 11 Oct 2012 18:56:46 +0200

> Date: Thu, 11 Oct 2012 09:12:50 +0200
> From: martin rudalics <[email-masked]>
> CC: [email-masked], [email-masked]
> 
> I have no idea what these window structure members (window_end_valid,
> last_modified and last_overlay_modified) stand for in practice, who's
> supposed to set them, why and when.  At least setting window_end_valid
> to Qnil in window_resize_apply did not help.  But writing
> 
>    if (! NILP (update)
> /**       && ! (! NILP (w->window_end_valid) **/
> /** 	    && w->last_modified >= BUF_MODIFF (b) **/
> /** 	    && w->last_overlay_modified >= BUF_OVERLAY_MODIFF (b)) **/
>        && !noninteractive)
> 
> makes the problem disappear.
> 
> So apparently this can be fixed easily but as long as I don't understand
> that cryptic conjunct I won't do it.

That 'if' is just an optimization: it tries to avoid a (potentially
expensive) call to move_it_vertically.  It could be expensive with
large windows and/or very long lines, for example.

So if window-end is not supposed to be called in some inner loop, and
we don't mind getting slower on behalf of a package whose design is
known to be flawed anyway, we can disable the optimization.  Disabling
this optimization should never do any harm, AFAIU, except slow down
the function.