]> code.delx.au - gnu-emacs/commitdiff
(window_scroll_pixel_based): Don't call Fbolp;
authorRichard M. Stallman <rms@gnu.org>
Tue, 28 May 2002 20:26:34 +0000 (20:26 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 28 May 2002 20:26:34 +0000 (20:26 +0000)
instead, see if the new start pos is at beginning of line.

src/window.c

index 24a95dc53a1074a5a9affceeac20c79a8fa0981a..60476414fb2a959596ec2718355260054ea3f305 100644 (file)
@@ -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);