diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-12-19 17:00:29 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-12-19 17:00:29 -0500 |
commit | b0e5aabad9c902ee5d664bf58885245060114f61 (patch) | |
tree | daf52ea8ffc62dc3eff706109c9d21ac9b69e197 /cmd2/argparse_completer.py | |
parent | 1a26c0254b2c2834998b8a28f04e8aedc08c587f (diff) | |
download | cmd2-git-b0e5aabad9c902ee5d664bf58885245060114f61.tar.gz |
Renamed ansi_safe_wcswidth() to style_aware_wcswidth()
Renamed ansi_aware_write() to style_aware_write()
Diffstat (limited to 'cmd2/argparse_completer.py')
-rw-r--r-- | cmd2/argparse_completer.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd2/argparse_completer.py b/cmd2/argparse_completer.py index a2690dd0..23fd930e 100644 --- a/cmd2/argparse_completer.py +++ b/cmd2/argparse_completer.py @@ -444,11 +444,11 @@ class AutoCompleter(object): completions.sort(key=self._cmd2_app.default_sort_key) self._cmd2_app.matches_sorted = True - token_width = ansi.ansi_safe_wcswidth(action.dest) + token_width = ansi.style_aware_wcswidth(action.dest) completions_with_desc = [] for item in completions: - item_width = ansi.ansi_safe_wcswidth(item) + item_width = ansi.style_aware_wcswidth(item) if item_width > token_width: token_width = item_width @@ -585,7 +585,7 @@ class AutoCompleter(object): def _print_message(msg: str) -> None: """Print a message instead of tab completions and redraw the prompt and input line""" import sys - ansi.ansi_aware_write(sys.stdout, msg + '\n') + ansi.style_aware_write(sys.stdout, msg + '\n') rl_force_redisplay() def _print_arg_hint(self, arg_action: argparse.Action) -> None: |