aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2006-02-01 16:40:17 +0000
committerMax Horn2006-02-01 16:40:17 +0000
commit004b8b964a0651bbb75a4b6cf7b3ac6db92e6ab7 (patch)
tree0289edb5afc0c80742c08cd448a03188673b5275 /gui
parent129e7846b51a2f0e10ba70393283d13ca90eb1df (diff)
downloadscummvm-rg350-004b8b964a0651bbb75a4b6cf7b3ac6db92e6ab7.tar.gz
scummvm-rg350-004b8b964a0651bbb75a4b6cf7b3ac6db92e6ab7.tar.bz2
scummvm-rg350-004b8b964a0651bbb75a4b6cf7b3ac6db92e6ab7.zip
Patch #1420942 (console page down fix)
svn-id: r20342
Diffstat (limited to 'gui')
-rw-r--r--gui/console.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/console.cpp b/gui/console.cpp
index ef9472e841..962e9c02a3 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -312,8 +312,11 @@ void ConsoleDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) {
case 256 + 25: // pagedown
if (modifiers == OSystem::KBD_SHIFT) {
_scrollLine += _linesPerPage - 1;
- if (_scrollLine > _promptEndPos / _lineWidth)
+ if (_scrollLine > _promptEndPos / _lineWidth) {
_scrollLine = _promptEndPos / _lineWidth;
+ if (_scrollLine < _firstLineInBuffer + _linesPerPage - 1)
+ _scrollLine = _firstLineInBuffer + _linesPerPage - 1;
+ }
updateScrollBuffer();
draw();
}