Patch by Joshua R. Elsasser:

Fix another pair of Terminal scrolling bugs.

Resolves ticket #4655. Thanks!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33324 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2009-09-27 23:03:57 +00:00
parent 08fc7d6e1c
commit 4c8f11fed4

View File

@ -1317,6 +1317,9 @@ BasicTerminalBuffer::_Scroll(int32 top, int32 bottom, int32 numLines)
fScreen[lineToDrop]->Clear();
std::swap(fScreen[lineToDrop], fScreen[lineToKeep]);
}
// clear any lines between the two swapped ranges above
for (int32 i = bottom - numLines + 1; i < top + numLines; i++)
_LineAt(i)->Clear();
_Invalidate(top, bottom);
}
@ -1339,6 +1342,9 @@ BasicTerminalBuffer::_Scroll(int32 top, int32 bottom, int32 numLines)
fScreen[lineToDrop]->Clear();
std::swap(fScreen[lineToDrop], fScreen[lineToKeep]);
}
// clear any lines between the two swapped ranges above
for (int32 i = bottom - numLines + 1; i < top + numLines; i++)
_LineAt(i)->Clear();
_Invalidate(top, bottom);
}