(window_scroll_pixel_based): Don't recenter if

PT is partially visible in the window.
This commit is contained in:
Gerd Moellmann 2001-08-15 14:57:20 +00:00
parent 82f053ab59
commit 288d4e0606
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2001-08-15 Gerd Moellmann <gerd@gnu.org>
* window.c (window_scroll_pixel_based): Don't recenter if
PT is partially visible in the window.
* xterm.c (expose_window_tree, expose_window, expose_line): Return
1 when overwriting mouse-face.
(expose_frame): If mouse-face was overwritten, redo it.

View file

@ -3960,8 +3960,10 @@ window_scroll_pixel_based (window, n, whole, noerror)
SET_TEXT_POS_FROM_MARKER (start, w->start);
/* If PT is not visible in WINDOW, move back one half of
the screen. */
tem = Fpos_visible_in_window_p (make_number (PT), window, Qnil);
the screen. Allow PT to be partially visible, otherwise
something like (scroll-down 1) with PT in the line before
the partially visible one would recenter. */
tem = Fpos_visible_in_window_p (make_number (PT), window, Qt);
if (NILP (tem))
{
/* Move backward half the height of the window. Performance note: