[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scroll-down with pixel transition
From: |
Yuri Khan |
Subject: |
Re: scroll-down with pixel transition |
Date: |
Thu, 13 Apr 2017 15:35:51 +0700 |
On Thu, Apr 13, 2017 at 2:21 PM, Eli Zaretskii <address@hidden> wrote:
>> From: Tak Kunihiro <address@hidden>
>> I think before pixel-level vertical scrolling up or down,
>> scrolling single line up or down `with pixel transition' should be
>> implemented. It ends up (window-vscroll nil t) to be zero.
>> This may be good enough to give modern feel.
>>
>> I assign the snippet to mwheel-scroll-up-function and it works
>> OK so far.
>
> Sorry, I don't understand your proposal. Can you show some code?
I think I do, and can translate.
To reproduce: Scroll a window up or down by one line, e.g. by
(scroll-up 1) or (scroll-down 1).
Current behavior: The display is updated once, with the window
scrolled a whole line.
Desired behavior: The display is updated n times, with the window
scrolled 1 pixel, then 2 pixels, …, then n-1 pixels, then n pixels,
where n is the height of a line in pixels.
Attempted implementation:
(defun my-scroll-down-line ()
(interactive)
(scroll-down 1) ;; Undesired redraw happens here
(set-window-vscroll nil (1- (frame-char-height)) t)
(sit-for 0.001)
(dolist (vs (reverse (number-sequence 0 (- (frame-char-height) 2))))
(set-window-vscroll nil vs t)
(sit-for 0.001)))
Observed behavior: The display is updated n+1 times, first with the
window scrolled a whole line, then 1 pixel, 2 pixels, …, n-1 pixels,
finally a whole line again.
- Re: scroll-down with pixel transition, (continued)
- Re: scroll-down with pixel transition, Richard Stallman, 2017/04/22
- Re: scroll-down with pixel transition, Stefan Monnier, 2017/04/23
- Re: scroll-down with pixel transition, Richard Stallman, 2017/04/25
- Re: scroll-down with pixel transition, Dmitry Gutov, 2017/04/25
- Re: scroll-down with pixel transition, Stefan Monnier, 2017/04/25
- Re: scroll-down with pixel transition, Richard Stallman, 2017/04/26
- Re: scroll-down with pixel transition, Richard Stallman, 2017/04/26
- Re: scroll-down with pixel transition, Clément Pit-Claudel, 2017/04/15
- Re: scroll-down with pixel transition, Eli Zaretskii, 2017/04/15
- Re: scroll-down with pixel transition, Clément Pit-Claudel, 2017/04/15
- Re: scroll-down with pixel transition,
Yuri Khan <=
- Re: scroll-down with pixel transition, Eli Zaretskii, 2017/04/13