aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml2
-rw-r--r--src/org/connectbot/service/TerminalBridge.java14
2 files changed, 9 insertions, 7 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index cf76b29..97c80df 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.connectbot"
android:versionName="1.7-dev"
- android:versionCode="254">
+ android:versionCode="255">
<application
android:icon="@drawable/icon"
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) {