top: VIS_SAFE turned out to be unsafe

Unset VIS_SAFE flag as it turned out to be actually unsafe
for continuos top display as it's passing through sequences
resulting cursor movement (backspace, tab, carriage-return),
and explicitly set VIS_TAB for the same reason.

Reported by:	Mark Millard <marklmi@yahoo.com>, swills
Tested by:	Mark Millard <marklmi@yahoo.com>, swills
This commit is contained in:
Yuri Pankov 2020-07-14 22:43:40 +00:00
parent ef013ceecd
commit 13858b8824
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363207

View File

@ -1016,7 +1016,7 @@ format_next_process(struct handle * xhandle, char *(*get_userid)(int), int flags
len = (argbuflen - (dst - argbuf) - 1) / 4;
strvisx(dst, src,
MIN(strlen(src), len),
VIS_NL | VIS_CSTYLE | VIS_OCTAL | VIS_SAFE);
VIS_NL | VIS_TAB | VIS_CSTYLE | VIS_OCTAL);
while (*dst != '\0')
dst++;
if ((argbuflen - (dst - argbuf) - 1) / 4 > 0)