[Konsole-devel] fillUnusedArea - bug: 301442, 246484

Kurt Hindenburg kurt.hindenburg at gmail.com
Fri Jun 8 13:36:16 UTC 2012


This code looks wrong; remind me where this is used?  The charsToFill is
either 0 or a negative number in my testing.  If the scroll back is huge,
the charsToFill will go beyond what a -int can handle.  Also, if
charsToFill is negative don't bother calling fillWithDefaultChar.

Thoughts?
   Kurt


void ScreenWindow::fillUnusedArea()
    int screenEndLine = _screen->getHistLines() + _screen->getLines() - 1;
    int windowEndLine = currentLine() + windowLines() - 1;

    int unusedLines = windowEndLine - screenEndLine;
    int charsToFill = unusedLines * windowColumns();

    Screen::fillWithDefaultChar(_windowBuffer + _windowBufferSize -
charsToFill, charsToFill);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20120608/df4b9d12/attachment.html>


More information about the konsole-devel mailing list