mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-14 03:42:53 +03:00
Ticket #1718: OpenSuse: Showing 'B' artefact in command line of user 'root'
This patch was grabbed from Russian fork (ru-fork). Original commit message: [COMMAND LINE]: Fix SUSE gabage, letter B in command prompt under root! Yessssssss! :) Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
467d833ac3
commit
ad8e1563d4
@ -780,7 +780,8 @@ strip_ctrl_codes (char *s)
|
||||
for (w = s, r = s; *r; ) {
|
||||
if (*r == ESC_CHAR) {
|
||||
/* Skip the control sequence's arguments */ ;
|
||||
if (*(++r) == '[') {
|
||||
/* '(' need to avoid strange 'B' letter in *Suse (if mc runs under root user) */
|
||||
if (*(++r) == '[' || *r == '(') {
|
||||
/* strchr() matches trailing binary 0 */
|
||||
while (*(++r) && strchr ("0123456789;?", *r));
|
||||
} else
|
||||
|
Loading…
x
Reference in New Issue
Block a user