Skip to content

Instantly share code, notes, and snippets.

Created February 8, 2014 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/8890021 to your computer and use it in GitHub Desktop.
Save anonymous/8890021 to your computer and use it in GitHub Desktop.
diff --git a/src/Screen.cpp b/src/Screen.cpp
index c322406..dd1197a 100644
--- a/src/Screen.cpp
+++ b/src/Screen.cpp
@@ -203,7 +203,18 @@ void Screen::deleteChars(int n)
Q_ASSERT(n >= 0);
Q_ASSERT(_cuX + n <= _screenLines[_cuY].count());
+ //_screenLines[_cuY].remove(_cuX, n);
+
+ Character spaceWithCurrentAttrs = Character();
+ spaceWithCurrentAttrs.foregroundColor = _effectiveForeground;
+ spaceWithCurrentAttrs.backgroundColor = _effectiveBackground;
+ spaceWithCurrentAttrs.rendition = _effectiveRendition;
+ spaceWithCurrentAttrs.isRealCharacter = false;
+
_screenLines[_cuY].remove(_cuX, n);
+
+ for (int i = 0; i < n; i++)
+ _screenLines[_cuY].append(spaceWithCurrentAttrs);
}
@vincepii
Copy link

vincepii commented Feb 8, 2014

Please, instantiate the Character object with

Character spaceWithCurrentAttrs;

@elw00d
Copy link

elw00d commented Feb 9, 2014

Ow, of course, thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment