emacs-devel
[Top][All Lists]
Advanced

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

Re: scroll-down with pixel transition


From: Eli Zaretskii
Subject: Re: scroll-down with pixel transition
Date: Thu, 13 Apr 2017 11:57:24 +0300

> From: Yuri Khan <address@hidden>
> Date: Thu, 13 Apr 2017 15:35:51 +0700
> Cc: Tak Kunihiro <address@hidden>, Emacs developers <address@hidden>
> 
> 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.

See my response to the code posted by Tak-san.



reply via email to

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