From c85eff199159638b815851e585a2b53b7e04e1cf Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 16 Jun 2008 16:24:37 +0000 Subject: [PATCH] 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 --- src/apps/terminal/BasicTerminalBuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/terminal/BasicTerminalBuffer.cpp b/src/apps/terminal/BasicTerminalBuffer.cpp index a1a1c6a7fd..f9f332f4d2 100644 --- a/src/apps/terminal/BasicTerminalBuffer.cpp +++ b/src/apps/terminal/BasicTerminalBuffer.cpp @@ -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