changeset 20580:5cf53b5a6bde

(redisplay_window): Set pos.bytepos along with pos.bufpos.
author Richard M. Stallman <rms@gnu.org>
date Sat, 03 Jan 1998 07:07:02 +0000
parents a30c6f1b3335
children 9b78b337e8bf
files src/xdisp.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Sat Jan 03 07:06:18 1998 +0000
+++ b/src/xdisp.c	Sat Jan 03 07:07:02 1998 +0000
@@ -2260,7 +2260,10 @@
       /* If we scrolled to an actual line boundary,
 	 that's different; don't ignore line boundaries.  */
       && FETCH_BYTE (pos.bufpos - 1) != '\n')
-    pos.bufpos = PT - minibuffer_scroll_overlap;
+    {
+      pos.bufpos = PT - minibuffer_scroll_overlap;
+      pos.bytepos = CHAR_TO_BYTE (pos.bufpos);
+    }
     
   /* Set startp here explicitly in case that helps avoid an infinite loop
      in case the window-scroll-functions functions get errors.  */
@@ -2270,6 +2273,7 @@
       run_hook_with_args_2 (Qwindow_scroll_functions, window,
 			    make_number (pos.bufpos));
       pos.bufpos = marker_position (w->start);
+      pos.bytepos = marker_byte_position (w->start);
     }
   try_window (window, pos.bufpos);