From 8ea060d47f58bd0b2fb152f36c136cf5831fa76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 27 Sep 2009 09:26:01 +0000 Subject: [PATCH] patch by Joshua R. Elsasser: (ticket #4651) * Fixed upward scrolling of a partial screen which is anchored at line 0. Thanks a lot! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33318 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 41f85fad39..a870b74627 100644 --- a/src/apps/terminal/BasicTerminalBuffer.cpp +++ b/src/apps/terminal/BasicTerminalBuffer.cpp @@ -1219,7 +1219,7 @@ BasicTerminalBuffer::_Scroll(int32 top, int32 bottom, int32 numLines) // TODO: It may be more efficient to actually move the scrolled // lines only (might depend on the number of scrolled/unscrolled // lines). - for (int32 i = bottom + 1; i < fHeight; i++) { + for (int32 i = fHeight - 1; i > bottom; i--) { std::swap(fScreen[_LineIndex(i)], fScreen[_LineIndex(i + numLines)]); }