diff options
author | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-08-30 23:37:01 -0700 |
---|---|---|
committer | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-09-01 11:45:11 -0700 |
commit | 1a5c2f5761210a05602c7c7e799ccb0f059b42ff (patch) | |
tree | 6bc95accfb0e1a35ef0d2fa080c7dee5b886db00 /com32/cmenu | |
parent | 510811554b97c29077cc0a07fff09ec005f380fb (diff) | |
download | syslinux.git-1a5c2f5761210a05602c7c7e799ccb0f059b42ff.tar.gz syslinux.git-1a5c2f5761210a05602c7c7e799ccb0f059b42ff.tar.xz syslinux.git-1a5c2f5761210a05602c7c7e799ccb0f059b42ff.zip |
cmenu: fix background color
The menu highlights some characters to mark them as key shortcuts.
To switch the bold attribute off, we were printing the reset code,
resetting the background color in the same time.
Use ANSI sequence 22 instead.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/cmenu')
-rw-r--r-- | com32/cmenu/libmenu/com32io.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/com32/cmenu/libmenu/com32io.c b/com32/cmenu/libmenu/com32io.c index 92344da9..ca207eed 100644 --- a/com32/cmenu/libmenu/com32io.c +++ b/com32/cmenu/libmenu/com32io.c @@ -37,8 +37,12 @@ static void cprint_vga2ansi(const char chr, const char attr) *p++ = '\033'; *p++ = '['; + /* Beware! Do not use '1': this will reset all attributes off, + * including the background color - as a result, the background + * would be black after the highlight area <X> */ if (last_attr & ~attr & 0x88) { - *p++ = '0'; + *p++ = '2'; + *p++ = '2'; *p++ = ';'; } if (attr & 0x08) { |