diff options
author | Helmut Grohne <helmut@subdivi.de> | 2016-12-09 21:14:16 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2016-12-09 21:14:16 +0100 |
commit | c691fc4657905bf15964aa36b459544d0a81d3c7 (patch) | |
tree | 41a11619bbf8acf4614a3fa99d7676da58ac67de | |
parent | f6f8d6d50b7823266684807eb4cad1db3e74c0d9 (diff) | |
download | tcvt-c691fc4657905bf15964aa36b459544d0a81d3c7.tar.gz |
fix adding characters at the end of the window
When the number of columns wasn't exactly 2 (the default), adding a
character at the end of the window could fail at scrolling thus yielding
corrupted output.
-rwxr-xr-x | tcvt.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -168,7 +168,7 @@ 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 == 2 * self.height: + if self.ypos + 1 == self.numcolumns * self.height: self.scroll() self.move(self.ypos, 0) else: |