summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-01-21 08:23:12 +0000
committernicm <nicm@openbsd.org>2012-01-21 08:23:12 +0000
commit869852ca8fdbb5d63ba9615f1027f239bd334f9a (patch)
tree9acee33ae248f60913eb718fa0bf0605c96e01c7 /usr.bin/tmux/tty.c
parentOne day I will actually fix ALL the warnings before I commit... (diff)
downloadwireguard-openbsd-869852ca8fdbb5d63ba9615f1027f239bd334f9a.tar.xz
wireguard-openbsd-869852ca8fdbb5d63ba9615f1027f239bd334f9a.zip
Add strings to allow the aixterm bright colours to be used when
configuring colours, requested by Elliott Cable a few months ago.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 6f44eb21839..b6bf87c0e7e 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.111 2012/01/15 19:39:42 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.112 2012/01/21 08:23:12 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1440,7 +1440,7 @@ tty_check_bg(struct tty *tty, struct grid_cell *gc)
/* Is this an aixterm colour? */
colours = tty_term_number(tty->term, TTYC_COLORS);
- if (gc->bg >= 100 && gc->bg <= 107 && colours < 16) {
+ if (gc->bg >= 90 && gc->bg <= 97 && colours < 16) {
gc->bg -= 90;
gc->attr |= GRID_ATTR_BRIGHT;
}
@@ -1500,14 +1500,14 @@ tty_colours_bg(struct tty *tty, const struct grid_cell *gc)
}
/* Is this an aixterm bright colour? */
- if (bg >= 100 && bg <= 107) {
+ if (bg >= 90 && bg <= 97) {
/* 16 colour terminals or above only. */
if (tty_term_number(tty->term, TTYC_COLORS) >= 16) {
- xsnprintf(s, sizeof s, "\033[%dm", bg);
+ xsnprintf(s, sizeof s, "\033[%dm", bg + 10);
tty_puts(tty, s);
goto save_bg;
}
- bg -= 100;
+ bg -= 90;
/* no such thing as a bold background */
}