mirror of
https://github.com/KDE/konsole.git
synced 2026-06-11 23:45:09 -04:00
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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user