summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1995-06-05 12:35:17 +0000
committerKarl Heuer <kwzh@gnu.org>1995-06-05 12:35:17 +0000
commit881fc295472629b3ed151fbcaadb69be11f08b11 (patch)
treec878ea5923a01453985a21f31e4478fe37248070 /src/term.c
parent3ee5d3ab4110bbb64aea9075b9fcbd3a2b21ccb2 (diff)
downloademacs-881fc295472629b3ed151fbcaadb69be11f08b11.tar.gz
(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.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/term.c b/src/term.c
index 6de8227bd22..91ba9866fb3 100644
--- a/src/term.c
+++ b/src/term.c
@@ -577,6 +577,11 @@ cursor_to (row, col)
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 @@ clear_end_of_line (first_unused_hpos)
{
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 @@ clear_end_of_line_raw (first_unused_hpos)
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;