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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 09 Oct 2012 19:04:05 +0200

> Date: Tue, 09 Oct 2012 11:36:41 +0200
> From: martin rudalics <[email-masked]>
> CC: [email-masked], [email-masked]
> 
>  > I don't think we can trust redisplay to have updated the screen before
>  > the hooks used by linum-mode run.
> 
> So what does
> 
>    If UPDATE is non-nil, compute the up-to-date position
>    if it isn't already recorded.
> 
> in the doc-string of `window-end' really stand for?

That it does whatever it can to retrieve the information.  But if the
info is not there, e.g., if the resize didn't yet cause the glyph
matrices to be reallocated to match the new size, we cannot expect
redisplay to succeed in this case.

When you reproduce the problem, do you see the code conditioned by the
'if' shown below being executed at all?

(Btw, it looks like linum-mode doesn't expect to get nil from
window-end, although the doc string explicitly says it's possible.)

  if (! NILP (update)
      && ! (! NILP (w->window_end_valid)
	    && w->last_modified >= BUF_MODIFF (b)
	    && w->last_overlay_modified >= BUF_OVERLAY_MODIFF (b))
      && !noninteractive)