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

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

Re: Scrolling jumpy when line-spacing > 0


From: Eli Zaretskii
Subject: Re: Scrolling jumpy when line-spacing > 0
Date: Fri, 21 Apr 2017 21:56:45 +0300

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Sat, 22 Apr 2017 00:58:08 +0700
> Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> 
> On Fri, Apr 21, 2017 at 9:40 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > (Why do people report bugs here, rather than with report-emacs-bug?)
> 
> To check if that is indeed a bug worth reporting, or if it is already
> known, or even already fixed?

All of these are good enough reasons to post to the bug tracker.  The
chances that people who subscribe to the bug list will quickly point
you to the solution or a similar bug report, if they exist, are way
higher than hearing that here.

> > On the master branch, when you click on the bottom line of
> > the window, which is only partially visible in the above scenario,
> > Emacs scrolls the window half-window up. To be able to put point on
> > the bottom line, you will need to set window-resize-pixelwise non-nil,
> > and drag the mode line down pixel by pixel until Emacs lets you put
> > point there.
> 
> Which point is that? When the whole additional spacing is visible?

Yes.

> As a user, I’d expect that additional spacing does not count toward
> whether the line is considered visible.

The Emacs display engine was designed to avoid having point in a
partially visible line, for whatever reasons.  The code which checks
for partial visibility doesn't care what is in the invisible part,
because checking for that would take non-trivial processing, and the
subtlety isn't important enough to slow down redisplay.

> > Doesn't pos-visible-in-window-p allow you to compute this more
> > elegantly, without moving point at all?
> 
> I was in the middle of a $DAYJOB task, and reached for the quickest fix.
> 
> But no, not really. On the contrary, I am compelled to add more
> kludges^W idiosyncratic code.

Actually, I understand the answer is YES for the purpose for which you
wrote the code on which I commented, except that there are additional
situations which you need to handle, where yet more code is called
for.

> The other special case is when the point is in the topmost visible
> line. In this case, (scroll-up 1) is forced to move the point into
> view. The point is moved to the beginning of the new topmost visible
> line, even if it was in the middle of the line initially. Here I want
> behavior equivalent to (next-line) followed by (scroll-up), i.e. to
> keep column position.
> 
> I see no practical way to detect this condition without moving point.

Doesn't posn-at-point allow you to find out whether point is in the
topmost window line?  (Caveat: this could require special
consideration when there's a non-nil header-line-format in the
window.)



reply via email to

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