Subject: Re: bug#31325: 27.0.50; PROPOSAL: introduce a new function to recenter without redisplaying the frame

From: Eli Zaretskii <[email-masked]>
Date: Mon, 02 Jul 2018 18:18:20 +0300

> From: John Shahid <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked]
> Date: Mon, 02 Jul 2018 02:27:22 +0000
> 
> Are you confusing redisplaying the window that is displaying the buffer
> with clearing and redisplaying the entire tty frame ? This patch
> addresses the latter.  To be clear, `recenter' will redisplay the window
> displaying the buffer and this patch doesn't change that behavior.

Indeed, I think there's some confusion here.  Recentering a window
will always trigger redisplay of that window if the new point is out
of view, or if enters the display margins.  But it doesn't necessarily
clear and redraw the entire frame.

For the record: historically, 'recenter' always cleared the entire
frame and drew it anew.  Then, almost exactly 9 years ago, we changed
the default behavior to clear and redraw frame only on TTYs, and
introduced a variable, recenter-redisplay, to disable redrawing even
of TTY frames.

The current change goes a step further in the same direction: it
modifies the behavior of non-interactive calls of 'recenter', such
that even on a TTY it doesn't by default redraw the entire frame,
unless the caller explicitly requests that.  If not specifically
requested, 'recenter' called non-interactively will just recenter (and
trigger redisplay of the window which it recentered, if necessary).
The rationale for this change is that the vast majority of
non-interactive callers of 'recenter' have no reason to redraw the
entire frame, and recenter-redisplay is a knob meant to control only
the interactive behavior.