summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-01-03 07:07:02 +0000
committerRichard M. Stallman <rms@gnu.org>1998-01-03 07:07:02 +0000
commit835766b6edb523d051b23ecf8a1ebd50e48f4915 (patch)
treea6f08164701bb3d2e66d8864b741d959c81b06c1
parentaeab5be0a87197d1aabc4f43f577afa79e5161cb (diff)
(redisplay_window): Set pos.bytepos along with pos.bufpos.
-rw-r--r--src/xdisp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 03157e30c46..147268f6427 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2260,7 +2260,10 @@ recenter:
/* 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 @@ recenter:
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);