Fix bug in tmux when TERM is set to xterm-256color

This commit is contained in:
Michael Lazar
2017-01-10 18:36:44 -08:00
parent e9cd4c4458
commit f3deea5abc

View File

@@ -341,7 +341,14 @@ class Page(object):
self._draw_content() self._draw_content()
self._draw_footer() self._draw_footer()
self._add_cursor() self._add_cursor()
self.term.stdscr.touchwin() # Note: There used to be a call to stdscr.touchwin() here. However, a
# bug was discovered in tmux when $TERM was set to `xterm-256color`,
# where only part of the screen got redrawn when scrolling. The correct
# solution is to use `screen-256color` (which gets set automatically by
# tmux) but many people override ther $TERM in their tmux.conf or
# .bashrc file. Using clearok() instead seems to fix the problem, at
# the expense of slightly more expensive screen refreshes.
self.term.stdscr.clearok(True)
self.term.stdscr.refresh() self.term.stdscr.refresh()
def _draw_header(self): def _draw_header(self):