Ignore second escape inside an escape code
This commit is contained in:
parent
ca551fdeb9
commit
a05fc52fc8
@ -221,9 +221,14 @@ static size_t width_without_escapes(wcstring ins) {
|
||||
auto w = fish_wcwidth(c);
|
||||
if (w > 0) width -= w;
|
||||
}
|
||||
}
|
||||
// Move us forward behind the escape code,
|
||||
// it might include a second escape!
|
||||
// E.g. SGR0 ("reset") is \e\(B\e\[m in xterm.
|
||||
pos += *len - 1;
|
||||
} else {
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
return width;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user