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 15:48:32 +0200

On Fri, Jun 18, 2010 at 9:58 AM, Eli Zaretskii <address@hidden> wrote:
>> From: Lennart Borgman <address@hidden>
>> Date: Fri, 18 Jun 2010 01:49:52 +0200
>> Cc: address@hidden
>>
>> > 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.
>
> As I tried to explain, this is not a bug, but expected behavior, at
> least in general: when scrolling fails to bring point into the window,
> the try_scrolling optimization fails, and other methods are tried
> instead.


I know but in this case it looks like a clear 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--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;
>>     }
>
> Again, this is normal.  You cannot prevent recentering from kicking in
> in some cases.


I do not think so. I see several small bugs around this. Please see
the later messages I sent for this example. (Point jumps etc. It is
not only scrolling.)



reply via email to

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