Issue #343 Added method to clear screen

This commit is contained in:
Ryan Reno
2017-06-20 21:07:24 -07:00
parent 752e63a509
commit 370cfa0642
2 changed files with 12 additions and 1 deletions

View File

@@ -769,3 +769,11 @@ class Terminal(object):
out = '\n'.join(stack)
return out
# Resolves tmux touchwin() bug and urxvt clearok() flashing bug
def clear_screen(self):
if os.environ['TERM'] is not 'xterm-256color':
self.stdscr.touchwin()
else:
self.stdscr.clearok(True)