# HG changeset patch # User Karl Heuer # Date 802355717 0 # Node ID f85f23c50344cade3a6f46240b4c61dacb855b4d # Parent 305d8df294a527c24f78f14265e239a594749493 (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. diff -r 305d8df294a5 -r f85f23c50344 src/term.c --- a/src/term.c Mon Jun 05 12:35:03 1995 +0000 +++ b/src/term.c Mon Jun 05 12:35:17 1995 +0000 @@ -577,6 +577,11 @@ return; } + /* Detect the case where we are called from reset_sys_modes + and the costs have never been calculated. Do nothing. */ + if (chars_wasted == 0) + return; + col += chars_wasted[row] & 077; if (curY == row && curX == col) return; @@ -670,6 +675,7 @@ { static GLYPH buf = SPACEGLYPH; if (FRAME_TERMCAP_P (selected_frame) + && chars_wasted != 0 && TN_standout_width == 0 && curX == 0 && chars_wasted[curY] != 0) write_glyphs (&buf, 1); clear_end_of_line_raw (first_unused_hpos); @@ -695,6 +701,11 @@ return; } + /* Detect the case where we are called from reset_sys_modes + and the costs have never been calculated. Do nothing. */ + if (chars_wasted == 0) + return; + first_unused_hpos += chars_wasted[curY] & 077; if (curX >= first_unused_hpos) return;