Scroll the FormWin when resize moves the current line out of the visible area

This commit is contained in:
Florent Le Coz 2014-05-01 16:40:00 +02:00
parent 16d80a2f25
commit b080c53ac4

View file

@ -435,6 +435,10 @@ class FormWin(object):
def resize(self, height, width, y, x):
self.height = height
self.width = width
# Adjust the scroll position, if resizing made the window too small
# for the cursor to be visible
while self.current_input - self.scroll_pos > self.height-1:
self.scroll_pos += 1
def reply(self):
"""