summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-01-17 14:23:57 -0500
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-01-17 14:23:57 -0500
commit2ffdefb6d1f7b2aab63aef529ea4bb46ead42b59 (patch)
tree5786cdfc4dcc478f78868bf9e2401ff28da120d7 /cmd2/cmd2.py
parente3b68241eb532dee6430c339534e2ee890abe5a3 (diff)
downloadcmd2-git-2ffdefb6d1f7b2aab63aef529ea4bb46ead42b59.tar.gz
Improved responsiveness when setting windows title and printing alerts
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py2
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