comparison src/xdisp.c @ 21028:0e9e9906db7b

(try_window_id): Use DEC_BOTH unconditionally. (display_text_line): Likewise.
author Kenichi Handa <handa@m17n.org>
date Tue, 03 Mar 1998 01:29:16 +0000
parents 115d8c173aaf
children 482ff111ccbc
comparison
equal deleted inserted replaced
21027:517de9005275 21028:0e9e9906db7b
2518 int last_text_vpos = 0; 2518 int last_text_vpos = 0;
2519 int stop_vpos; 2519 int stop_vpos;
2520 int selective = (INTEGERP (current_buffer->selective_display) 2520 int selective = (INTEGERP (current_buffer->selective_display)
2521 ? XINT (current_buffer->selective_display) 2521 ? XINT (current_buffer->selective_display)
2522 : !NILP (current_buffer->selective_display) ? -1 : 0); 2522 : !NILP (current_buffer->selective_display) ? -1 : 0);
2523 int multibyte = !NILP (current_buffer->enable_multibyte_characters);
2524 struct position val, bp, ep, xp, pp; 2523 struct position val, bp, ep, xp, pp;
2525 int scroll_amount = 0; 2524 int scroll_amount = 0;
2526 int delta; 2525 int delta;
2527 int epto, old_tick; 2526 int epto, old_tick;
2528 2527
2597 if (bp.contin && bp.hpos != lmargin) 2596 if (bp.contin && bp.hpos != lmargin)
2598 { 2597 {
2599 val.hpos = bp.prevhpos - width + lmargin; 2598 val.hpos = bp.prevhpos - width + lmargin;
2600 val.tab_offset = bp.tab_offset + bp.prevhpos - width; 2599 val.tab_offset = bp.tab_offset + bp.prevhpos - width;
2601 did_motion = 1; 2600 did_motion = 1;
2602 pos--; 2601 DEC_BOTH (pos, pos_byte);
2603 if (multibyte)
2604 DEC_POS (pos_byte);
2605 else
2606 pos_byte--;
2607 } 2602 }
2608 2603
2609 bp.vpos = vpos; 2604 bp.vpos = vpos;
2610 2605
2611 /* Find first visible newline after which no more is changed. */ 2606 /* Find first visible newline after which no more is changed. */
2864 } 2859 }
2865 else if (xp.contin && xp.hpos != lmargin) 2860 else if (xp.contin && xp.hpos != lmargin)
2866 { 2861 {
2867 val.hpos = xp.prevhpos - width + lmargin; 2862 val.hpos = xp.prevhpos - width + lmargin;
2868 val.tab_offset = xp.tab_offset + bp.prevhpos - width; 2863 val.tab_offset = xp.tab_offset + bp.prevhpos - width;
2869 pos--; 2864 DEC_BOTH (pos, pos_byte);
2870 if (multibyte)
2871 DEC_POS (pos_byte);
2872 else
2873 pos_byte--;
2874 } 2865 }
2875 2866
2876 blank_end_of_window = 1; 2867 blank_end_of_window = 1;
2877 /* The following code is omitted because we maintain tab offset 2868 /* The following code is omitted because we maintain tab offset
2878 in val.tab_offset. */ 2869 in val.tab_offset. */
3275 requested, if we hit a multi-column character, or the end of 3266 requested, if we hit a multi-column character, or the end of
3276 the line. If so, back up. */ 3267 the line. If so, back up. */
3277 if (left_edge->vpos > vpos 3268 if (left_edge->vpos > vpos
3278 || left_edge->hpos > 0) 3269 || left_edge->hpos > 0)
3279 { 3270 {
3280 pos = left_edge->bufpos - 1; 3271 pos = left_edge->bufpos;
3281 pos_byte = left_edge->bytepos; 3272 pos_byte = left_edge->bytepos;
3282 if (multibyte) 3273 DEC_BOTH (pos, pos_byte);
3283 DEC_POS (pos_byte);
3284 else
3285 pos_byte--;
3286 hpos = left_edge->prevhpos; 3274 hpos = left_edge->prevhpos;
3287 } 3275 }
3288 else 3276 else
3289 { 3277 {
3290 pos = left_edge->bufpos; 3278 pos = left_edge->bufpos;
3924 } 3912 }
3925 else 3913 else
3926 { 3914 {
3927 *p1++ = fix_glyph (f, continuer, 0); 3915 *p1++ = fix_glyph (f, continuer, 0);
3928 val.vpos = 0; 3916 val.vpos = 0;
3929 lastpos--; 3917 DEC_BOTH (lastpos, lastpos_byte);
3930 if (multibyte)
3931 DEC_POS (lastpos_byte);
3932 else
3933 lastpos_byte--;
3934 val.tab_offset = taboffset + width; 3918 val.tab_offset = taboffset + width;
3935 } 3919 }
3936 } 3920 }
3937 } 3921 }
3938 else 3922 else