diff options
Diffstat (limited to 'tcvt.py')
-rwxr-xr-x | tcvt.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -168,11 +168,20 @@ class Columns: def addch(self, char): if self.xpos == self.columnwidth - 1: - self.curwin.insch(self.curypos, self.curxpos, char, self.attrs) if self.ypos + 1 == self.numcolumns * self.height: + self.curwin.scrollok(0) # disable scrolling for the addch call + try: + self.curwin.addch(self.curypos, self.curxpos, char, + self.attrs) + except curses.error: + # It errors out, but still draws the character. + # http://stackoverflow.com/a/41923640/1626632 + pass + self.curwin.scrollok(1) self.scroll() self.move(self.ypos, 0) else: + self.curwin.addch(self.curypos, self.curxpos, char, self.attrs) self.move(self.ypos + 1, 0) else: self.curwin.addch(self.curypos, self.curxpos, char, self.attrs) |