Skip to content

Commit 77a6c22

Browse files
committed
Fixed typo in docstring
1 parent 33a451d commit 77a6c22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd2/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ def truncate_line(line: str, max_width: int, *, tab_width: int = 4) -> str:
952952
If there are ANSI style sequences in the string after where truncation occurs, this function will append them
953953
to the returned string.
954954
955-
This is done to prevent issues caused in cases like: truncate_string(fg.blue + hello + fg.reset, 3)
955+
This is done to prevent issues caused in cases like: truncate_line(fg.blue + hello + fg.reset, 3)
956956
In this case, "hello" would be truncated before fg.reset resets the color from blue. Appending the remaining style
957957
sequences makes sure the style is in the same state had the entire string been printed. align_text() relies on this
958958
behavior when preserving style over multiple lines.

0 commit comments

Comments
 (0)