Add profile option to scroll full/half height via Page Up/Down keys

The default is still half page - there is no GUI to change this;
either use konsoleprofile or change the .profile manually.

CCBUG: 280637
This commit is contained in:
Kurt Hindenburg
2013-02-24 12:03:46 -05:00
parent 2c686b7afe
commit 3cd4d2e440
7 changed files with 32 additions and 4 deletions

View File

@@ -211,12 +211,15 @@ int ScreenWindow::currentLine() const
return qBound(0, _currentLine, lineCount() - windowLines());
}
void ScreenWindow::scrollBy(RelativeScrollMode mode , int amount)
void ScreenWindow::scrollBy(RelativeScrollMode mode, int amount, bool fullPage)
{
if (mode == ScrollLines) {
scrollTo(currentLine() + amount);
} else if (mode == ScrollPages) {
scrollTo(currentLine() + amount * (windowLines() / 2));
if (fullPage)
scrollTo(currentLine() + amount * (windowLines()));
else
scrollTo(currentLine() + amount * (windowLines() / 2));
}
}