Fix wrong rendering at the end of line when drawing colored whitespaces

Previous code just deleted the end characters; new code puts in spaces
with current attributes at the end of the line.

Thanks to Igor Kostromin elwood.su@gmail.com for bug, research + patch

See bko for test code + more info
BUG: 330214
FIXED-IN: 2.13

(cherry picked from commit 427de88cc1)
This commit is contained in:
Kurt Hindenburg
2014-02-09 11:02:01 -05:00
parent b18b1b306f
commit 3d9c101877

View File

@@ -204,6 +204,14 @@ void Screen::deleteChars(int n)
Q_ASSERT(_cuX + n <= _screenLines[_cuY].count());
_screenLines[_cuY].remove(_cuX, n);
// Append space(s) with current attributes
Character spaceWithCurrentAttrs(' ', _effectiveForeground,
_effectiveBackground,
_effectiveRendition, false);
for (int i = 0; i < n; i++)
_screenLines[_cuY].append(spaceWithCurrentAttrs);
}
void Screen::insertChars(int n)