commit 314ba1d37f1bd671653154db5c06e9aba52b5465
Author: Joshua R. Elsasser <joshua@elsasser.org>
Date: Sat Sep 26 21:36:04 2009 +0000
Fix upward scrolling of a partial screen which is anchored at line 0.
diff --git a/src/apps/terminal/BasicTerminalBuffer.cpp b/src/apps/terminal/BasicTerminalBuffer.cpp
index 41f85fa..a870b74 100644
a
|
b
|
BasicTerminalBuffer::_Scroll(int32 top, int32 bottom, int32 numLines)
|
1219 | 1219 | // TODO: It may be more efficient to actually move the scrolled |
1220 | 1220 | // lines only (might depend on the number of scrolled/unscrolled |
1221 | 1221 | // lines). |
1222 | | for (int32 i = bottom + 1; i < fHeight; i++) { |
| 1222 | for (int32 i = fHeight - 1; i > bottom; i--) { |
1223 | 1223 | std::swap(fScreen[_LineIndex(i)], |
1224 | 1224 | fScreen[_LineIndex(i + numLines)]); |
1225 | 1225 | } |