Prevent scrolling of views which are not following the latest output when new output is received from the terminal and the history is full.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=670451
This commit is contained in:
Robert Knight
2007-06-01 14:27:26 +00:00
parent d0141e5e82
commit de79549e8f
4 changed files with 45 additions and 2 deletions

View File

@@ -217,6 +217,16 @@ void ScreenWindow::notifyOutputChanged()
_scrollCount -= _screen->scrolledLines();
_currentLine = _screen->getHistLines();
}
else
{
// if the history is not unlimited then it may
// have run out of space and dropped the oldest
// lines of output - in this case the screen
// window's current line number will need to
// be adjusted - otherwise the output will scroll
_currentLine = qMax(0,_currentLine -
_screen->droppedLines());
}
emit outputChanged();
}