mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 14:22:34 +00:00
fix(clap): Early line wrap ascii control chars
counting ascii control sequences lead to unpredictable and early line breaks on colorized inputs (e.g. syntax highlighted strings)
This commit is contained in:
parent
95c638842a
commit
505f760df9
1 changed files with 1 additions and 0 deletions
|
@ -63,6 +63,7 @@ pub(crate) fn display_width(text: &str) -> usize {
|
|||
control_sequence = true;
|
||||
} else if control_sequence && ch == control_terminate {
|
||||
control_sequence = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if !control_sequence {
|
||||
|
|
Loading…
Reference in a new issue