From 8dfdc0e8deef20757ccb2b7fe623d1116a8a3bd0 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Fri, 12 Feb 2010 04:47:43 +0000 Subject: Set bold for default colors git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@476 df292f66-193f-0410-a5fc-6d59da041ff2 --- src/org/connectbot/service/TerminalBridge.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/org') 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) { -- cgit v1.2.3