all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 12600@debbugs.gnu.org
Subject: bug#12600: 24.2.50; linum-mode: line numbers in fringe do not refresh when resizing frame
Date: Wed, 10 Oct 2012 17:45:43 +0200	[thread overview]
Message-ID: <83ehl6z5y0.fsf@gnu.org> (raw)
In-Reply-To: <50754C80.7010809@gmx.at>

> Date: Wed, 10 Oct 2012 12:22:56 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: cschol2112@gmail.com, 12600@debbugs.gnu.org
> 
>  > When you reproduce the problem, do you see the code conditioned by the
>  > 'if' shown below being executed at all?
> 
> No.

QED.  Redisplay thinks that nothing's changed, and returns the
previous (wrong) window-end.

>  > (Btw, it looks like linum-mode doesn't expect to get nil from
>  > window-end, although the doc string explicitly says it's possible.)
> 
> I suppose the doc-string is wrong since otherwise we should have seen
> this already reported.  IIUC it returns either
> 
>        value = make_number (IT_CHARPOS (it));
> 
> or
> 
>      XSETINT (value, BUF_Z (b) - XFASTINT (w->window_end_pos));
> 
> while the nil reporting part was disabled.

It was disabled with a comment saying

  #if 0 /* This change broke some things.  We should make it later.  */
                                           ^^^^^^^^^^^^^^^^^^^^^^^
If everybody agrees that the doc string is wrong, then we should
permanently delete this code when we update the doc.  Otherwise, some
day the function will begin returning nil, and applications should be
prepared for that. 

>  >   if (! NILP (update)
>  >       && ! (! NILP (w->window_end_valid)
>  > 	    && w->last_modified >= BUF_MODIFF (b)
>  > 	    && w->last_overlay_modified >= BUF_OVERLAY_MODIFF (b))
>  >       && !noninteractive)
> 
> Is there anything that has not been set when the frame got resized?

I'm guessing it's the window_end_valid flag, since no buffer changes
are involved in the recipe.  Which probably means that the resize did
not yet become known to the display engine by the time this function
is called.

Of course, this is all theory, and I was wrong before.  It would be
best to trace this with a debugger and see what's going on.





  reply	other threads:[~2012-10-10 15:45 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-07 23:03 bug#12600: 24.2.50; linum-mode: line numbers in fringe do not refresh when resizing frame Christoph Scholtes
2012-10-08  7:31 ` Eli Zaretskii
2012-10-08  9:17   ` martin rudalics
2012-10-08 13:59     ` Stefan Monnier
2012-10-08 15:48     ` Eli Zaretskii
2012-10-09  9:36       ` martin rudalics
2012-10-09 17:04         ` Eli Zaretskii
2012-10-10 10:22           ` martin rudalics
2012-10-10 15:45             ` Eli Zaretskii [this message]
2012-10-11  7:12               ` martin rudalics
2012-10-11 16:56                 ` Eli Zaretskii
2012-10-12  7:32                   ` martin rudalics
2012-10-12  8:52                     ` Eli Zaretskii
2012-10-12  9:35                       ` martin rudalics
2012-10-12 13:51                         ` Eli Zaretskii
2012-10-12 15:42                           ` martin rudalics
2012-10-12 14:55                         ` Stefan Monnier
2012-10-12 15:36                           ` Eli Zaretskii
2012-10-12 15:43                           ` martin rudalics
2012-10-13  8:56                             ` Eli Zaretskii
2012-10-13  9:51                               ` martin rudalics
2012-10-13 12:45                                 ` Eli Zaretskii
2012-10-13 17:45                                   ` martin rudalics
2012-10-13 18:08                                     ` Eli Zaretskii
2012-10-14 10:21                                       ` martin rudalics
2012-10-14 12:06                                         ` Eli Zaretskii
2012-10-14 18:33                                           ` martin rudalics
2012-10-14 20:01                                             ` Eli Zaretskii
2012-10-15  9:41                                               ` martin rudalics
2012-10-15 19:39                                                 ` Eli Zaretskii
2012-10-16  9:39                                                   ` martin rudalics
2012-10-16 17:35                                                     ` Eli Zaretskii
2012-10-15  9:40 ` martin rudalics
2012-11-09  9:49   ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ehl6z5y0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=12600@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.