Skip to content

Commit 505f760

Browse files
committed
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)
1 parent 95c6388 commit 505f760

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: src/output/textwrap/core.rs

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pub(crate) fn display_width(text: &str) -> usize {
6363
control_sequence = true;
6464
} else if control_sequence && ch == control_terminate {
6565
control_sequence = false;
66+
continue;
6667
}
6768

6869
if !control_sequence {

0 commit comments

Comments
 (0)