Skip to content

Instantly share code, notes, and snippets.

Created February 8, 2014 20:44
Show Gist options
  • Select an option

  • Save anonymous/8890021 to your computer and use it in GitHub Desktop.

Select an option

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

vincepii commented Feb 8, 2014

Copy link
Copy Markdown

Please, instantiate the Character object with

Character spaceWithCurrentAttrs;

@igor-kostromin

Copy link
Copy Markdown

Ow, of course, thank you :)

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