diff options
-rw-r--r-- | cmd2/ansi.py | 2 | ||||
-rw-r--r-- | cmd2/argparse_completer.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/ansi.py b/cmd2/ansi.py index d0159629..0f34016d 100644 --- a/cmd2/ansi.py +++ b/cmd2/ansi.py @@ -184,7 +184,7 @@ def strip_style(text: str) -> str: def style_aware_wcswidth(text: str) -> int: """ - Wrap wcswidth to make it compatible with strings that contains ANSI style sequences. + Wrap wcswidth to make it compatible with strings that contain ANSI style sequences. This is intended for single line strings. If text contains a newline, this function will return -1. For multiline strings, call widest_line() instead. diff --git a/cmd2/argparse_completer.py b/cmd2/argparse_completer.py index a40a9e2e..21007289 100644 --- a/cmd2/argparse_completer.py +++ b/cmd2/argparse_completer.py @@ -526,7 +526,7 @@ class ArgparseCompleter: def _format_completions(self, arg_state: _ArgumentState, completions: List[Union[str, CompletionItem]]) -> List[str]: # Check if the results are CompletionItems and that there aren't too many to display if 1 < len(completions) <= self._cmd2_app.max_completion_items and isinstance(completions[0], CompletionItem): - four_spaces = ' ' + four_spaces = 4 * ' ' # If the user has not already sorted the CompletionItems, then sort them before appending the descriptions if not self._cmd2_app.matches_sorted: |