reset screen offset of top line if it exceeds the number of screens
commit0625ddc2bcaad60fbc0bb2dc944876b90bda572c
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 26 Feb 2011 13:56:21 +0000 (26 14:56 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 26 Feb 2011 13:56:21 +0000 (26 14:56 +0100)
tree1d3a55a51a67838b18ae2f9d58d379dc44cdad92
parentd7349f6116020f64d7e83891e1758c0b716f2e08
reset screen offset of top line if it exceeds the number of screens

Some operations such as changing the tab size may change the number of
screens needed to display a line and may therefore result in the current
screen offset to exceed this number of screens.
This could in turn result in the entire screen not being populated properly.

This patch detects and corrects this situation while populating the
screen after reformatting.

Problem reported and fixed by patrick keshishian <pkeshish@gmail.com>
vi/vs_smap.c