changeset 21280:82fbf42bb989

(redisplay_window): Give byte position to FETCH_BYTE. Call pos_tab_offset appropriately. (try_window_id): Give byte position to FETCH_BYTE. Set val.bytepos to pos_byte.
author Kenichi Handa <handa@m17n.org>
date Wed, 25 Mar 1998 10:45:59 +0000
parents 9d5cc9392151
children 3763e516cf1e
files src/xdisp.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue Mar 24 17:08:34 1998 +0000
+++ b/src/xdisp.c	Wed Mar 25 10:45:59 1998 +0000
@@ -2321,7 +2321,7 @@
       && PT > BEGV + minibuffer_scroll_overlap
       /* If we scrolled to an actual line boundary,
 	 that's different; don't ignore line boundaries.  */
-      && FETCH_BYTE (pos.bufpos - 1) != '\n')
+      && FETCH_BYTE (pos.bytepos - 1) != '\n')
     {
       pos.bufpos = PT - minibuffer_scroll_overlap;
       pos.bytepos = CHAR_TO_BYTE (pos.bufpos);
@@ -2637,7 +2637,7 @@
      newline before it, so the following line must be redrawn. */
   if (stop_vpos == ep.vpos
       && (ep.bufpos == BEGV
-	  || FETCH_BYTE (ep.bufpos - 1) != '\n'
+	  || FETCH_BYTE (ep.bytepos - 1) != '\n'
 	  || ep.bufpos == Z - end_unchanged))
     stop_vpos = ep.vpos + 1;
 
@@ -2661,13 +2661,13 @@
 
       /* Is everything on frame below the changes whitespace?
 	 If so, no scrolling is really necessary.  */
-      for (i = ep.bufpos; i < xp.bufpos; i++)
+      for (i = ep.bytepos; i < xp.bytepos; i++)
 	{
 	  tem = FETCH_BYTE (i);
 	  if (tem != ' ' && tem != '\n' && tem != '\t')
 	    break;
 	}
-      if (i == xp.bufpos)
+      if (i == xp.bytepos)
 	return -2;
 
       XSETFASTINT (w->window_end_vpos,
@@ -2824,7 +2824,7 @@
       if (pos != val.bufpos)
 	last_text_vpos
 	  /* Next line, unless prev line ended in end of buffer with no cr */
-	    = vpos - (val.vpos && FETCH_BYTE (val.bufpos - 1) != '\n');
+	    = vpos - (val.vpos && FETCH_BYTE (val.bytepos - 1) != '\n');
       pos = val.bufpos;
     }
 
@@ -2877,7 +2877,7 @@
       if (val.hpos < lmargin)
 	tab_offset += width;
 #endif
-      val.bytepos = pos;
+      val.bytepos = pos_byte;
       while (vpos < height)
 	{
 	  val = *display_text_line (w, pos, val.bytepos,