Commit 3ddd9fc5 authored by David Wilson's avatar David Wilson

mitop: fix overlong command lines corrupting the followign line

parent 00ae0f22
...@@ -92,7 +92,7 @@ class Painter(object): ...@@ -92,7 +92,7 @@ class Painter(object):
curses.endwin() curses.endwin()
def paint(self): def paint(self):
self.stdscr.clear() self.stdscr.erase()
self.stdscr.addstr(0, 0, time.ctime()) self.stdscr.addstr(0, 0, time.ctime())
all_procs = [] all_procs = []
...@@ -116,7 +116,10 @@ class Painter(object): ...@@ -116,7 +116,10 @@ class Painter(object):
self.stdscr.attron(curses.A_BOLD) self.stdscr.attron(curses.A_BOLD)
else: else:
self.stdscr.attroff(curses.A_BOLD) self.stdscr.attroff(curses.A_BOLD)
self.stdscr.addstr(2+i, 0, self.format % vars(proc)) self.stdscr.addstr(2+i, 0, self.format % dict(
vars(proc),
command=proc.command[:self.width-36]
))
self.stdscr.refresh() self.stdscr.refresh()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment