Mercurial > emacs
comparison src/window.c @ 38830:a6f5dfd3e5f4
(window_scroll_pixel_based): Don't recenter if
PT is partially visible in the window.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 15 Aug 2001 14:56:51 +0000 |
parents | b1f9c6a7a002 |
children | 5f60884970a8 |
comparison
equal
deleted
inserted
replaced
38829:505c81790c49 | 38830:a6f5dfd3e5f4 |
---|---|
3958 int vscrolled = 0; | 3958 int vscrolled = 0; |
3959 | 3959 |
3960 SET_TEXT_POS_FROM_MARKER (start, w->start); | 3960 SET_TEXT_POS_FROM_MARKER (start, w->start); |
3961 | 3961 |
3962 /* If PT is not visible in WINDOW, move back one half of | 3962 /* If PT is not visible in WINDOW, move back one half of |
3963 the screen. */ | 3963 the screen. Allow PT to be partially visible, otherwise |
3964 tem = Fpos_visible_in_window_p (make_number (PT), window, Qnil); | 3964 something like (scroll-down 1) with PT in the line before |
3965 the partially visible one would recenter. */ | |
3966 tem = Fpos_visible_in_window_p (make_number (PT), window, Qt); | |
3965 if (NILP (tem)) | 3967 if (NILP (tem)) |
3966 { | 3968 { |
3967 /* Move backward half the height of the window. Performance note: | 3969 /* Move backward half the height of the window. Performance note: |
3968 vmotion used here is about 10% faster, but would give wrong | 3970 vmotion used here is about 10% faster, but would give wrong |
3969 results for variable height lines. */ | 3971 results for variable height lines. */ |