mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
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)
|
static void clear_line(void)
|
||||||
{
|
{
|
||||||
printf("\033[s");
|
|
||||||
putchar('\r');
|
putchar('\r');
|
||||||
printf("\033[K");
|
printf("\033[K");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
@ -591,7 +590,12 @@ static void redisplay(void)
|
|||||||
putchar(*c);
|
putchar(*c);
|
||||||
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);
|
fflush(stdout);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user