diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-01-17 14:23:57 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-01-17 14:23:57 -0500 |
commit | 2ffdefb6d1f7b2aab63aef529ea4bb46ead42b59 (patch) | |
tree | 5786cdfc4dcc478f78868bf9e2401ff28da120d7 /cmd2/cmd2.py | |
parent | e3b68241eb532dee6430c339534e2ee890abe5a3 (diff) | |
download | cmd2-git-2ffdefb6d1f7b2aab63aef529ea4bb46ead42b59.tar.gz |
Improved responsiveness when setting windows title and printing alerts
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index cce281b7..900a2451 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -3802,6 +3802,7 @@ class Cmd(cmd.Cmd): cursor_offset=rl_get_point(), alert_msg=alert_msg) if rl_type == RlType.GNU: sys.stderr.write(terminal_str) + sys.stderr.flush() elif rl_type == RlType.PYREADLINE: # noinspection PyUnresolvedReferences readline.rl.mode.console.write(terminal_str) @@ -3854,6 +3855,7 @@ class Cmd(cmd.Cmd): if self.terminal_lock.acquire(blocking=False): try: sys.stderr.write(ansi.set_title_str(title)) + sys.stderr.flush() except AttributeError: # Debugging in Pycharm has issues with setting terminal title pass |