forked from Mirrors/freeswitch
fs_cli: ask less of the terminal; fix ctrl-l behavior
This commit is contained in:
parent
fe60938686
commit
a2d6a041eb
@ -575,7 +575,6 @@ static int stdout_writable(void)
|
||||
|
||||
static void clear_line(void)
|
||||
{
|
||||
printf("\033[s");
|
||||
putchar('\r');
|
||||
printf("\033[K");
|
||||
fflush(stdout);
|
||||
@ -591,7 +590,12 @@ static void redisplay(void)
|
||||
putchar(*c);
|
||||
c++;
|
||||
}
|
||||
printf("\033[u");
|
||||
{
|
||||
int pos = (int)(lf->cursor - lf->buffer);
|
||||
putchar('\r');
|
||||
printf("\033[%dC", bare_prompt_str_len);
|
||||
if (pos > 0) printf("\033[%dC", pos);
|
||||
}
|
||||
fflush(stdout);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user