aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-03-25 10:45:59 +0000
committerKenichi Handa1998-03-25 10:45:59 +0000
commitf1c87a7d427dc9b74131e5b85e3675fa1320f029 (patch)
treec47812574cac2d58845680e5d7002d30566becaf /src
parent95ffcc7f6ce904700cd3a238d91999099cb16a43 (diff)
downloademacs-f1c87a7d427dc9b74131e5b85e3675fa1320f029.tar.gz
emacs-f1c87a7d427dc9b74131e5b85e3675fa1320f029.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index d05aa173e15..bc8d75e349a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2321,7 +2321,7 @@ recenter:
2321 && PT > BEGV + minibuffer_scroll_overlap 2321 && PT > BEGV + minibuffer_scroll_overlap
2322 /* If we scrolled to an actual line boundary, 2322 /* If we scrolled to an actual line boundary,
2323 that's different; don't ignore line boundaries. */ 2323 that's different; don't ignore line boundaries. */
2324 && FETCH_BYTE (pos.bufpos - 1) != '\n') 2324 && FETCH_BYTE (pos.bytepos - 1) != '\n')
2325 { 2325 {
2326 pos.bufpos = PT - minibuffer_scroll_overlap; 2326 pos.bufpos = PT - minibuffer_scroll_overlap;
2327 pos.bytepos = CHAR_TO_BYTE (pos.bufpos); 2327 pos.bytepos = CHAR_TO_BYTE (pos.bufpos);
@@ -2637,7 +2637,7 @@ try_window_id (window)
2637 newline before it, so the following line must be redrawn. */ 2637 newline before it, so the following line must be redrawn. */
2638 if (stop_vpos == ep.vpos 2638 if (stop_vpos == ep.vpos
2639 && (ep.bufpos == BEGV 2639 && (ep.bufpos == BEGV
2640 || FETCH_BYTE (ep.bufpos - 1) != '\n' 2640 || FETCH_BYTE (ep.bytepos - 1) != '\n'
2641 || ep.bufpos == Z - end_unchanged)) 2641 || ep.bufpos == Z - end_unchanged))
2642 stop_vpos = ep.vpos + 1; 2642 stop_vpos = ep.vpos + 1;
2643 2643
@@ -2661,13 +2661,13 @@ try_window_id (window)
2661 2661
2662 /* Is everything on frame below the changes whitespace? 2662 /* Is everything on frame below the changes whitespace?
2663 If so, no scrolling is really necessary. */ 2663 If so, no scrolling is really necessary. */
2664 for (i = ep.bufpos; i < xp.bufpos; i++) 2664 for (i = ep.bytepos; i < xp.bytepos; i++)
2665 { 2665 {
2666 tem = FETCH_BYTE (i); 2666 tem = FETCH_BYTE (i);
2667 if (tem != ' ' && tem != '\n' && tem != '\t') 2667 if (tem != ' ' && tem != '\n' && tem != '\t')
2668 break; 2668 break;
2669 } 2669 }
2670 if (i == xp.bufpos) 2670 if (i == xp.bytepos)
2671 return -2; 2671 return -2;
2672 2672
2673 XSETFASTINT (w->window_end_vpos, 2673 XSETFASTINT (w->window_end_vpos,
@@ -2824,7 +2824,7 @@ try_window_id (window)
2824 if (pos != val.bufpos) 2824 if (pos != val.bufpos)
2825 last_text_vpos 2825 last_text_vpos
2826 /* Next line, unless prev line ended in end of buffer with no cr */ 2826 /* Next line, unless prev line ended in end of buffer with no cr */
2827 = vpos - (val.vpos && FETCH_BYTE (val.bufpos - 1) != '\n'); 2827 = vpos - (val.vpos && FETCH_BYTE (val.bytepos - 1) != '\n');
2828 pos = val.bufpos; 2828 pos = val.bufpos;
2829 } 2829 }
2830 2830
@@ -2877,7 +2877,7 @@ try_window_id (window)
2877 if (val.hpos < lmargin) 2877 if (val.hpos < lmargin)
2878 tab_offset += width; 2878 tab_offset += width;
2879#endif 2879#endif
2880 val.bytepos = pos; 2880 val.bytepos = pos_byte;
2881 while (vpos < height) 2881 while (vpos < height)
2882 { 2882 {
2883 val = *display_text_line (w, pos, val.bytepos, 2883 val = *display_text_line (w, pos, val.bytepos,