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

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

bug#34723: 27.0.50; customize and improve diff-mode recentering


From: Eli Zaretskii
Subject: bug#34723: 27.0.50; customize and improve diff-mode recentering
Date: Wed, 06 Mar 2019 18:06:14 +0200

> Date: Tue, 05 Mar 2019 21:37:32 +0100
> From: address@hidden (Charles A. Roelli)
> CC: address@hidden
> 
> > I don't understand what calling 'recenter' has to do with
> > scroll-conservatively.  And scroll-conservatively is implemented in
> > the display engine, so I'm afraid I'm still in the dark regarding the
> > nature of the problem you are discussing.
> 
> Does the following scenario make some sense?  diff-hunk-next moves
> point to a position beyond (window-end), and immediately calls
> (recenter '(0)).  Scrolling (which would otherwise respect
> scroll-conservatively) gets preempted by diff-hunk-next's call to
> recenter.

Why does it call 'recenter'?  It must have a reason, doesn't it?  Does
the history of that code gives a clue?

Note that without recentering, if you just move point to some location
in the diffs, when scroll-conservatively > 100, point will wind up
either on the last screen line of the window or its first screen line,
depending on whether you move forward or back in the buffer.  The
latter might be okay, but the former will most probably hide most of
the hunk, which might be the reason for recentering (I'm just guessing
here).





reply via email to

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