Mercurial > emacs
comparison src/term.c @ 12071:f85f23c50344
(cursor_to, clear_to_end_of_line_raw):
If chars_wasted is 0, do nothing.
(clear_end_of_line): Don't die if chars_wasted is 0.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 05 Jun 1995 12:35:17 +0000 |
parents | a265aaa699e0 |
children | 7f2c068121d8 |
comparison
equal
deleted
inserted
replaced
12070:305d8df294a5 | 12071:f85f23c50344 |
---|---|
575 { | 575 { |
576 (*cursor_to_hook) (row, col); | 576 (*cursor_to_hook) (row, col); |
577 return; | 577 return; |
578 } | 578 } |
579 | 579 |
580 /* Detect the case where we are called from reset_sys_modes | |
581 and the costs have never been calculated. Do nothing. */ | |
582 if (chars_wasted == 0) | |
583 return; | |
584 | |
580 col += chars_wasted[row] & 077; | 585 col += chars_wasted[row] & 077; |
581 if (curY == row && curX == col) | 586 if (curY == row && curX == col) |
582 return; | 587 return; |
583 if (!TF_standout_motion) | 588 if (!TF_standout_motion) |
584 background_highlight (); | 589 background_highlight (); |
668 clear_end_of_line (first_unused_hpos) | 673 clear_end_of_line (first_unused_hpos) |
669 int first_unused_hpos; | 674 int first_unused_hpos; |
670 { | 675 { |
671 static GLYPH buf = SPACEGLYPH; | 676 static GLYPH buf = SPACEGLYPH; |
672 if (FRAME_TERMCAP_P (selected_frame) | 677 if (FRAME_TERMCAP_P (selected_frame) |
678 && chars_wasted != 0 | |
673 && TN_standout_width == 0 && curX == 0 && chars_wasted[curY] != 0) | 679 && TN_standout_width == 0 && curX == 0 && chars_wasted[curY] != 0) |
674 write_glyphs (&buf, 1); | 680 write_glyphs (&buf, 1); |
675 clear_end_of_line_raw (first_unused_hpos); | 681 clear_end_of_line_raw (first_unused_hpos); |
676 } | 682 } |
677 | 683 |
692 : selected_frame))) | 698 : selected_frame))) |
693 { | 699 { |
694 (*clear_end_of_line_hook) (first_unused_hpos); | 700 (*clear_end_of_line_hook) (first_unused_hpos); |
695 return; | 701 return; |
696 } | 702 } |
703 | |
704 /* Detect the case where we are called from reset_sys_modes | |
705 and the costs have never been calculated. Do nothing. */ | |
706 if (chars_wasted == 0) | |
707 return; | |
697 | 708 |
698 first_unused_hpos += chars_wasted[curY] & 077; | 709 first_unused_hpos += chars_wasted[curY] & 077; |
699 if (curX >= first_unused_hpos) | 710 if (curX >= first_unused_hpos) |
700 return; | 711 return; |
701 /* Notice if we are erasing a magic cookie */ | 712 /* Notice if we are erasing a magic cookie */ |