(get_cmdline, cl_refresh): If TERMINAL_DUMB

section is always 0.
 Line is only cleared if !TERMINAL_DUMB.
This commit is contained in:
kr 2002-01-18 17:16:44 +00:00
parent ca6e068bb9
commit 3190c1f483

View file

@ -385,7 +385,8 @@ get_cmdline (char *prompt, char *cmdline, int maxlen,
if (full) if (full)
{ {
/* Recompute the section number. */ /* Recompute the section number. */
if (lpos + plen < CMDLINE_WIDTH) if ((terminal & TERMINAL_DUMB)
|| (lpos + plen < CMDLINE_WIDTH))
section = 0; section = 0;
else else
section = ((lpos + plen - CMDLINE_WIDTH) section = ((lpos + plen - CMDLINE_WIDTH)
@ -449,6 +450,8 @@ get_cmdline (char *prompt, char *cmdline, int maxlen,
pos++; pos++;
} }
if (! (terminal & TERMINAL_DUMB))
{
/* Fill up the rest of the line with spaces. */ /* Fill up the rest of the line with spaces. */
for (; i < start + len; i++) for (; i < start + len; i++)
{ {
@ -491,6 +494,7 @@ get_cmdline (char *prompt, char *cmdline, int maxlen,
} }
# endif /* SUPPORT_SERIAL */ # endif /* SUPPORT_SERIAL */
} }
}
/* Initialize the command-line. */ /* Initialize the command-line. */
void cl_init (void) void cl_init (void)