GNU bug report logs -
#32839
27.0.50; recenter doesn't redisplay
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Tue, 25 Sep 2018 19:38:02 UTC
Severity: normal
Tags: wontfix
Found in version 27.0.50
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 32839 <at> debbugs.gnu.org (full text, mbox):
> From: Juri Linkov <juri <at> linkov.net>
> Cc: 32839 <at> debbugs.gnu.org
> Date: Thu, 27 Sep 2018 02:55:38 +0300
>
> 1. recenter doesn't redraw the frame when it is called with
> a non-nil REDISPLAY argument.
>
> In `recenter-top-bottom', when `recenter-last-op' is `top',
> this gets called:
>
> (recenter this-scroll-margin t)
>
> When `this-scroll-margin' is 0, the actual call is:
>
> (recenter 0 t)
>
> Despite its REDISPLAY argument set to t, the frame is not redisplayed.
This is how 'recenter' is documented to behave:
If ARG is omitted or nil, then recenter with point on the middle line
of the selected window; if REDISPLAY & ‘recenter-redisplay’ are
non-nil, also erase the entire frame and redraw it [...]
IOW, the frame is redrawn only when ARG is nil and REDISPLAY is
non-nil.
> 2. The second problem is that after the call to (recenter -1 t),
> window-scroll-functions is called only when recenter moves the current
> buffer line to the second-last window line (when the last window line is
> partially visible). But when the last window line is fully visible,
> window-scroll-functions is not called after (recenter -1 t).
Depending on the exact dimensions of the window and the size of your
font, this can legitimately happen.
You see, the way 'recenter' works, it sets a couple of fields in the
window object which instruct the display engine to change the
window-start point. The actual recentering happens during the very
next redisplay cycle, at which time the display engine sees these
fields and acts accordingly. To redisplay a window, the display
engine has several methods at its disposal; starting with the cheapest
one, it attempts to find the first applicable one, and then uses it.
Only some of the methods are considered to use "scrolling", others
aren't. So that's why window-scroll-functions might not be called
when the text was "scrolled" by 'recenter' and its derivatives.
Like I said: "scrolling" is only well-defined when you use the
scrolling functions and commands, like scroll-up, scroll-down-command,
etc. It is not well-defined with other functions which move the
viewport, so window-scroll-functions may or may not be called when
those other functions are invoked.
Bottom line, I see no problem in the behavior described in this bug
report, and I think it should be closed.
This bug report was last modified 5 years and 103 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.