aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/connectbot/service/TerminalBridge.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/connectbot/service/TerminalBridge.java')
-rw-r--r--src/org/connectbot/service/TerminalBridge.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/org/connectbot/service/TerminalBridge.java b/src/org/connectbot/service/TerminalBridge.java
index 9daea38..c748046 100644
--- a/src/org/connectbot/service/TerminalBridge.java
+++ b/src/org/connectbot/service/TerminalBridge.java
@@ -1074,13 +1074,13 @@ public class TerminalBridge implements VDUDisplay, OnKeyListener {
int addr = 0;
int currAttr = buffer.charAttributes[buffer.windowBase + l][c];
- // reset default colors
- fg = color[defaultFg];
- bg = color[defaultBg];
+ {
+ int fgcolor = defaultFg;
+
+ // check if foreground color attribute is set
+ if ((currAttr & VDUBuffer.COLOR_FG) != 0)
+ fgcolor = ((currAttr & VDUBuffer.COLOR_FG) >> VDUBuffer.COLOR_FG_SHIFT) - 1;
- // check if foreground color attribute is set
- if ((currAttr & VDUBuffer.COLOR_FG) != 0) {
- int fgcolor = ((currAttr & VDUBuffer.COLOR_FG) >> VDUBuffer.COLOR_FG_SHIFT) - 1;
if (fgcolor < 8 && (currAttr & VDUBuffer.BOLD) != 0)
fg = color[fgcolor + 8];
else
@@ -1090,6 +1090,8 @@ public class TerminalBridge implements VDUDisplay, OnKeyListener {
// check if background color attribute is set
if ((currAttr & VDUBuffer.COLOR_BG) != 0)
bg = color[((currAttr & VDUBuffer.COLOR_BG) >> VDUBuffer.COLOR_BG_SHIFT) - 1];
+ else
+ bg = color[defaultBg];
// support character inversion by swapping background and foreground color
if ((currAttr & VDUBuffer.INVERT) != 0) {