Fix off by one when restoring cursor position after resize. Fixes #344

This commit is contained in:
Kovid Goyal
2018-02-25 09:15:48 +05:30
parent 11e85ac703
commit 1fe936dbbc
2 changed files with 7 additions and 1 deletions

View File

@@ -245,6 +245,12 @@ class TestScreen(BaseTest):
y = s.cursor.y
self.assertIn('|', str(s.line(y)))
s = self.create_screen()
draw('a')
x_before = s.cursor.x
s.resize(s.lines - 1, s.columns)
self.ae(x_before, s.cursor.x)
def test_tab_stops(self):
# Taken from vttest/main.c
s = self.create_screen(cols=80, lines=2)