summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Hindenburg <kurt.hindenburg@gmail.com>2014-02-09 16:02:01 (GMT)
committerKurt Hindenburg <kurt.hindenburg@gmail.com>2014-02-09 16:02:01 (GMT)
commit427de88cc1020c7fb9fb2b8752fddfd4cc0be736 (patch)
treef2fbfcf1735e243308f3a184545e3c99a30a3b64
parent0f4afa0cc872b039b6a2139ecc779b4e8a82b87e (diff)
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
-rw-r--r--src/Screen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Screen.cpp b/src/Screen.cpp
index c322406..6692484 100644
--- a/src/Screen.cpp
+++ b/src/Screen.cpp
@@ -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)