mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
fs_cli: make enhanced fs_cli features work on all TERMs
FS-3815 --resolve This is a workaround for the fact that libedit counts terminal control characters when calculating the length of the prompt. By not using absolute positioning, we avoid the issue. Thanks to Ivan Isaev for the workaround and testing.
This commit is contained in:
@@ -609,10 +609,15 @@ mc_again:
|
||||
}
|
||||
del = where - el->el_cursor.h;
|
||||
|
||||
#if 0
|
||||
/* workaround miscounting of control characters in prompt by
|
||||
avoiding absolute horizontal positioning */
|
||||
if ((del < -4 || del > 4) && GoodStr(T_ch))
|
||||
/* go there directly */
|
||||
(void) tputs(tgoto(Str(T_ch), where, where), where, term__putc);
|
||||
else {
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (del > 0) { /* moving forward */
|
||||
if ((del > 4) && GoodStr(T_RI))
|
||||
(void) tputs(tgoto(Str(T_RI), del, del),
|
||||
|
Reference in New Issue
Block a user