summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Wise <pabs3@bonedaddy.net>2016-08-04 15:37:07 +0800
committerPaul Wise <pabs3@bonedaddy.net>2016-08-04 15:37:07 +0800
commitc8cc7ef97be1bd8854eb9c5c627e61cc0752674f (patch)
tree2e45db449f6f7b21c07471eebf6d08ca96198eb9
parentf004d8172cdcb6c3dbc461815913f8c3cc7c8829 (diff)
downloadiotop-c8cc7ef97be1bd8854eb9c5c627e61cc0752674f.tar.gz
Correct the location of the status message
It wasn't taking into account the titles line. It was placed one line above the bottom of the screen.
-rw-r--r--iotop/ui.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/iotop/ui.py b/iotop/ui.py
index 9c3de99..44cfc34 100644
--- a/iotop/ui.py
+++ b/iotop/ui.py
@@ -496,7 +496,7 @@ class IOTopUI(object):
status_msg = ('CONFIG_TASK_DELAY_ACCT not enabled in kernel, '
'cannot determine SWAPIN and IO %')
num_lines = min(len(lines),
- self.height - 2 - int(bool(status_msg)))
+ self.height - len(summary) - int(bool(titles)) - int(bool(status_msg)))
for i in range(num_lines):
try:
def print_line(line):
@@ -510,7 +510,7 @@ class IOTopUI(object):
except curses.error:
pass
if status_msg:
- self.win.insstr(self.height - len(summary), 0, status_msg,
+ self.win.insstr(self.height - 1, 0, status_msg,
curses.A_BOLD)
self.win.refresh()