diff options
author | Richard M. Stallman <[email protected]> | 2002-05-28 20:26:34 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 2002-05-28 20:26:34 +0000 |
commit | dad67609c8173919fc1e5b7b5fca3a89e8b65091 (patch) | |
tree | 29408eb924cf33711dcb75922b8c642f8633b441 | |
parent | bf3428a1e41d32f256bfa89f5da6b8e95f36d956 (diff) |
(window_scroll_pixel_based): Don't call Fbolp;
instead, see if the new start pos is at beginning of line.
-rw-r--r-- | src/window.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c index 24a95dc53a..60476414fb 100644 --- a/src/window.c +++ b/src/window.c @@ -4162,10 +4162,14 @@ window_scroll_pixel_based (window, n, whole, noerror) if (! vscrolled) { + int pos = IT_CHARPOS (it); + int bytepos; /* Set the window start, and set up the window for redisplay. */ - set_marker_restricted (w->start, make_number (IT_CHARPOS (it)), + set_marker_restricted (w->start, make_number (pos), w->buffer); - w->start_at_line_beg = Fbolp (); + bytepos = XMARKER (w->start)->bytepos; + w->start_at_line_beg = ((pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n') + ? Qt : Qnil); w->update_mode_line = Qt; XSETFASTINT (w->last_modified, 0); XSETFASTINT (w->last_overlay_modified, 0); |