emacs-devel
[Top][All Lists]
Advanced

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

Re: The unwarranted scrolling assumption


From: Lennart Borgman
Subject: Re: The unwarranted scrolling assumption
Date: Fri, 18 Jun 2010 01:49:52 +0200

On Fri, Jun 18, 2010 at 12:50 AM, Lennart Borgman
<address@hidden> wrote:
> On Fri, Jun 18, 2010 at 12:16 AM, Lennart Borgman
> <address@hidden> wrote:
>>
>> I guess an interesting part may be why clear_glyph_matrix failed. Do
>> you think there is something interesting there?
>
> Eh, sorry, my confusion. It is not clear_glyph_matrix that failed, of
> course. I just meant the reason we came to that line in try_scrolling.
> What lead to the condition
>
>  w->cursor.vpos < 0
>
> BTW, looking at the code there are a couple of places where
> w->cursor.vpos is set to -1. I guess the tests are just for if it is <
> 0. Wouldn't it be better to set different negative values so it would
> be easier to see where it failed? (That is normal error tracing.)

I notice now that this is clearly a separate issue, not related to
speed. It is another bug.

Recentering happens whenever you are at the bottom of the screen if
some conditions are met. I can reproduce it with this:

- Open window.c
- Goto line 702:

                             + WINDOW_HEADER_LINE_HEIGHT (w)),

- Turn on wrap-to-fill-column-mode. Turn it off again.
- Turn on visual-line-mode
- I have (window-width) = 55, height 34.
- Position to W in WINDOW (it is on a wrapped line)
- Use C-L to get this to the bottom.
- Press down arrow.

(Note: wrap-to-fill-column-mode justs adds add wrap-prefix here. Which
is for some reason does not remove. Bug ;-( --
wrap-to-fill-column-mode is of course part of nXhtml, but probably you
can just add a fill prefix on the whole line that is equal to what the
line indentation have.)

For me this recenters. And try_scrolling fails where I said before,
around line 13581:

  /* Display the window.  Give up if new fonts are loaded, or if point
     doesn't appear.  */
  if (!try_window (window, startp, 0))
    rc = SCROLLING_NEED_LARGER_MATRICES;
  else if (w->cursor.vpos < 0)
    {
      clear_glyph_matrix (w->desired_matrix);
      DebPrint (("try_scrolling SCROLLING_FAILED clear_glyph"));
      rc = SCROLLING_FAILED;
    }


Playing with this I see some other bugs to. Which bug I see depends on
the window width. 55 gives this one, 54 another one where point jumps
instead.

But I get no output in the message buffer or in the debugger telling
what went wrong. That is a bit strange.



reply via email to

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