Incorrect array index calculation in case of scrolling only part of the

screen (as vim does for instance). Should fix #2382 and #2386.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25973 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-06-16 16:24:37 +00:00
parent 44820a5d88
commit c85eff1991

View File

@ -1116,7 +1116,7 @@ BasicTerminalBuffer::_Scroll(int32 top, int32 bottom, int32 numLines)
// lines).
for (int32 i = bottom + 1; i < fHeight; i++) {
std::swap(fScreen[_LineIndex(i)],
fScreen[_LineIndex(i) + numLines]);
fScreen[_LineIndex(i + numLines)]);
}
// update the screen offset and clear the new lines