summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-10-09 20:55:15 +0100
committerLars Wirzenius <liw@liw.fi>2010-10-09 20:55:15 +0100
commite0101f42d8e56a326b19861489a2784ce29ac4dc (patch)
tree4e427d7e94b3d09a99880cb609f4dde4c198fe27
parentd61b4fd92d3e031fb13eac6e1dd8d4b990bbf146 (diff)
downloadpython-ttystatus-e0101f42d8e56a326b19861489a2784ce29ac4dc.tar.gz
Fix bug: the last updates are not output by .finish().
The problem was that the messager's cached message did not get updated with all updates, only when it was time to actually output things. This sounds like a great optimization, but causes the last updates to not get cached, and so .finish() did not output them.
-rw-r--r--ttystatus/status.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/ttystatus/status.py b/ttystatus/status.py
index e96666b..6d42ba7 100644
--- a/ttystatus/status.py
+++ b/ttystatus/status.py
@@ -72,8 +72,7 @@ class TerminalStatus(object):
for w in widgets:
w.update(self, width)
width -= len(str(w))
- if self._m.time_to_write():
- self._m.write(''.join(str(w) for w in self._widgets))
+ self._m.write(''.join(str(w) for w in self._widgets))
def increase(self, key, delta):
'''Increase value for a key by a given amount.'''