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:
Harald Gutmann 2022-10-08 19:55:52 +02:00
parent 95c638842a
commit 505f760df9

View file

@ -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 {