[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Set-window-vscroll sometimes doesn't work
From: |
Yuan Fu |
Subject: |
Re: Set-window-vscroll sometimes doesn't work |
Date: |
Thu, 22 Oct 2020 00:16:04 -0400 |
>
>>>> That is why I suggest to stick to the code in simple.el as much as
>>>> possible: it is well tested and works, AFAIU you need to change it
>>>> very little to be able to scroll images that are smaller than the
>>>> window height -- that test is in a small number of places and can be
>>>> replaced by something else.
>>>>
>>>
>>> next-line and friends only vscroll when scroll-conservatively=0 and ARG=1,
>>> which allows it to get away from the problem I face (set-window-start and
>>> set-window-vscroll in the same time). I either implements smooth scrolling
>>> to only work when ARG=1 or I need to set both value at the same time.
>>
>> I don't understand why you say this. First, C-n works on tall images
>> with arguments greater than 1. And second, I still don't understand
>> why you need to set window-start, because vscroll should be enough for
>> your needs, as far as I understand.
>
> C-n doesn’t smooth scroll on tall images when ARG > 1: The code checks for
> ARG = 1, if not, it doesn’t do line-move-partial. I also tried C-2 C-n, no
> smooth scrolling.
>
> I thought vscroll is a relative measure and is measured against window-start.
> And it kind of makes sense to set a window start as the basis and set vscroll
> based on that. So I kind of assumed that window-start is always at least
> partially visible and vscroll is always less than the height of the first
> line. Now, if I throw away window-start and scrolls entirely by vscroll, will
> there be any problems? Like, does anyone relies on window-start being
> visible? I felt like that’s what people uses to get the first line displayed
> in the window.
>
Ok, I looked at redisplay_window, and it zeros out vscroll if force_start is
true, that explains my initial question. After reading the function, it seems
that setting window-start is the primary way to scroll and to produce the glyph
matrix to display. IIUC this is how window-start and vscroll works together in
window redisplay: we have a window-start -> try window -> start_display on
window-start -> it_initialize on window-start -> it->current-y adjusted
according to vscroll -> back to try window -> while (it.current_y <
it.last_visible_y): produce glyph rows. This doesn’t seem to be too
contradictory, and scrolling by setting window-start and add sub-line
adjustment with vscroll seems to be complaint with the redisplay logic. What am
I missing?
Yuan
- Re: Set-window-vscroll sometimes doesn't work, (continued)
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/19
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/19
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/19
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/19
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/19
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/20
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/20
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/20
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/21
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/21
- Re: Set-window-vscroll sometimes doesn't work,
Yuan Fu <=
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/22
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/22
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/22
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/22
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/23
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/23
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/23
- Re: Set-window-vscroll sometimes doesn't work, Yuan Fu, 2020/10/23
- Re: Set-window-vscroll sometimes doesn't work, Eli Zaretskii, 2020/10/24
- Re: Set-window-vscroll sometimes doesn't work, Jens C . Jensen, 2020/10/26