Commit 0956611a authored by Robert Knight's avatar Robert Knight
Browse files

Update output tracking state of screen window when scrolling using Shift+Page/Arrow keys

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=666825
parent 2fd69ce1
......@@ -140,6 +140,11 @@ void ScreenWindow::scrollBy( RelativeScrollMode mode , int amount )
}
}
bool ScreenWindow::atEndOfOutput() const
{
return _currentLine >= (lineCount()-windowLines());
}
void ScreenWindow::scrollTo( int line )
{
if ( line < 0 )
......
......@@ -137,6 +137,12 @@ public:
/** Returns the index of the line which is currently at the top of this window */
int currentLine() const;
/**
* Convenience method. Returns true if the window is currently at the bottom
* of the screen.
*/
bool atEndOfOutput() const;
/** Scrolls the window so that @p line is at the top of the window */
void scrollTo( int line );
......
......@@ -2246,6 +2246,8 @@ void TerminalDisplay::keyPressEvent( QKeyEvent* event )
if ( update )
{
_screenWindow->setTrackOutput( _screenWindow->atEndOfOutput() );
updateLineProperties();
updateImage();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment