emacs-devel
[Top][All Lists]
Advanced

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

Re: Latest changes in redisplay code


From: Dmitry Antipov
Subject: Re: Latest changes in redisplay code
Date: Wed, 06 Feb 2013 11:37:30 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

On 02/05/2013 10:01 PM, Eli Zaretskii wrote:

In any case, the potential for problems is still there, because now
w->base_line_pos gets reset to zero in many more places than it was
before.  Previously, only xdisp.c would manipulate this attribute in a
few well-defined places.  Now it can be reset by any function that
calls adjust_window_count, including wset_buffer, which is called from
many primitives, most of them outside xdisp.c.  Therefore, it's quite
possible that we will now have to count from the beginning of the
buffer much more frequently than we did before.  In large buffers,
this could be quite a hit.

Hm. I'll try to reproduce such a situation and check what happens.
Maybe we should invalidate window_end_valid and base_line_pos only
if either window is really switched to another buffer or buffer
is changed.

Revision 111584 also has a suspicious change:

    @@ -3189,7 +3182,7 @@ set_window_buffer (Lisp_Object window, L
       wset_window_end_pos (w, make_number (0));
       wset_window_end_vpos (w, make_number (0));
       memset (&w->last_cursor, 0, sizeof w->last_cursor);
    -  wset_window_end_valid (w, Qnil);
    +

Why was this setting dropped?

Because w->window_end_valid is invalidated in wset_buffer, which is
called by set_window_buffer.

Btw, here's one more questionable change, from revision 111583:

   @@ -13784,25 +13777,21 @@ mark_window_display_accurate (Lisp_Objec
      for (; !NILP (window); window = w->next)
        {
         w = XWINDOW (window);
   -      mark_window_display_accurate_1 (w, accurate_p);
   -
         if (!NILP (w->vchild))
          mark_window_display_accurate (w->vchild, accurate_p);
   -      if (!NILP (w->hchild))
   +      else if (!NILP (w->hchild))
          mark_window_display_accurate (w->hchild, accurate_p);
   +      else if (BUFFERP (w->buffer))
   +       mark_window_display_accurate_1 (w, accurate_p);

Isn't it possible for a window to have both an hchild and a vchild?

No. This is documented in window.h and regularly used in window.c,
for example, in delete_all_child_windows.

Dmitry



reply via email to

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