help-gnu-emacs
[Top][All Lists]
Advanced

[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: Sun, 18 Oct 2020 14:02:12 -0400


> On Oct 18, 2020, at 1:55 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Sun, 18 Oct 2020 13:51:14 -0400
>> Cc: help-gnu-emacs@gnu.org
>> 
>>> NOFORCE non-nil means Emacs doesn't have to display the window
>>> starting at the position if there are valid reasons, so yes.  But my
>>> suggestion is not to use set-window-start when you want to vscroll,
>>> it's unsafe.  You in effect create a conflict for the display engine,
>>> and have no control on how it will resolve that conflict.
>> 
>> Thanks. I see what you mean. What I want to do is to scroll over images as 
>> if it is made of several lines (like sliced images). Which requires 
>> scrolling over logical lines by set-window-start and scrolling over images 
>> by set-window-vscroll. Do you think I would be better off implementing this 
>> in, say, window_scroll_pixel_based rather than in Lisp?
> 
> It sounds like you want to do what we already have implemented in
> next-line and previous-line and their subroutines.  Typing C-n on a
> tall image scrolls the image the number of pixels that is equal to the
> line height.  Maybe you can just use that code?
> 

You might be right. Currently that (scroll by pixels) only happens if this tall 
line is taller than the window, maybe I can modify it so that it also do that 
(scroll by pixels) when the first line of the window is taller than, say 3x 
normal line height. I’ll dig deeper into this.

Yuan


reply via email to

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