aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/window.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c
index 24a95dc53a1..60476414fb2 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4162,10 +4162,14 @@ window_scroll_pixel_based (window, n, whole, noerror)
4162 4162
4163 if (! vscrolled) 4163 if (! vscrolled)
4164 { 4164 {
4165 int pos = IT_CHARPOS (it);
4166 int bytepos;
4165 /* Set the window start, and set up the window for redisplay. */ 4167 /* Set the window start, and set up the window for redisplay. */
4166 set_marker_restricted (w->start, make_number (IT_CHARPOS (it)), 4168 set_marker_restricted (w->start, make_number (pos),
4167 w->buffer); 4169 w->buffer);
4168 w->start_at_line_beg = Fbolp (); 4170 bytepos = XMARKER (w->start)->bytepos;
4171 w->start_at_line_beg = ((pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n')
4172 ? Qt : Qnil);
4169 w->update_mode_line = Qt; 4173 w->update_mode_line = Qt;
4170 XSETFASTINT (w->last_modified, 0); 4174 XSETFASTINT (w->last_modified, 0);
4171 XSETFASTINT (w->last_overlay_modified, 0); 4175 XSETFASTINT (w->last_overlay_modified, 0);