From 7739d31b116c74a7e0caad682278d2967158546d Mon Sep 17 00:00:00 2001 From: Ryan Reno Date: Thu, 22 Jun 2017 19:06:04 -0700 Subject: [PATCH] #343 added attribute to hold rxvt-unicode-256color variable instead of calling os.environ every time the screen is cleared. Also changed 'is not' to != in if statement --- rtv/terminal.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rtv/terminal.py b/rtv/terminal.py index df1a4c4..96698e9 100644 --- a/rtv/terminal.py +++ b/rtv/terminal.py @@ -59,6 +59,7 @@ class Terminal(object): self.loader = LoadScreen(self) self._display = None self._mailcap_dict = mailcap.getcaps() + self._term = os.environ['TERM'] @property def up_arrow(self): @@ -772,8 +773,8 @@ class Terminal(object): # Resolves tmux touchwin() bug and urxvt clearok() flashing bug def clear_screen(self): - if os.environ['TERM'] is not 'xterm-256color': + if self._term != 'xterm-256color': self.stdscr.touchwin() else: self.stdscr.clearok(True) - \ No newline at end of file +