Fix shadow over double-width
[fanfix.git] / src / jexer / TTerminalWindow.java
index d703b676007be0d256bc889bd1fa885addfc539c..945536d57f3e01849a0dc42b2808680707e63c33 100644 (file)
@@ -997,13 +997,8 @@ public class TTerminalWindow extends TScrollableWindow
             gr2.setFont(doubleFont);
 
             // Draw the background rectangle, then the foreground character.
-            if (getScreen() instanceof ECMA48Terminal) {
-                // BUG: the background color is coming in the same as the
-                // foreground color.  For now, don't draw it.
-            } else {
-                gr2.setColor(SwingTerminal.attrToBackgroundColor(cell));
-                gr2.fillRect(0, 0, image.getWidth(), image.getHeight());
-            }
+            gr2.setColor(SwingTerminal.attrToBackgroundColor(cell));
+            gr2.fillRect(0, 0, image.getWidth(), image.getHeight());
             if (!cell.isBlink()
                 || (cell.isBlink() && cursorBlinkVisible)
             ) {
@@ -1066,6 +1061,11 @@ public class TTerminalWindow extends TScrollableWindow
         }
         left.setImage(leftImage);
         right.setImage(rightImage);
+        // Since we have image data, ditch the character here.  Otherwise, a
+        // drawBoxShadow() over the terminal window will show the characters
+        // which looks wrong.
+        left.setChar(' ');
+        right.setChar(' ');
         putCharXY(x, y, left);
         putCharXY(x + 1, y, right);
     }