Fix crash occurring when clearing the history when there was a view on the session which is not at the bottom. Add assertions to catch such errors earlier in future.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=681379
This commit is contained in:
Robert Knight
2007-06-28 19:03:26 +00:00
parent 1d42231cc8
commit ad4208b0e6
2 changed files with 28 additions and 20 deletions

View File

@@ -227,6 +227,10 @@ void ScreenWindow::notifyOutputChanged()
// be adjusted - otherwise the output will scroll
_currentLine = qMax(0,_currentLine -
_screen->droppedLines());
// ensure that the screen window's current position does
// not go beyond the bottom of the screen
_currentLine = qMin( _currentLine , _screen->getHistLines() );
}
emit outputChanged();