aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-01-21 19:33:45 +0000
committerTiago Cunha <tcunha@gmx.com>2012-01-21 19:33:45 +0000
commitd4c2a935f2039e00a7a7384fa0427a6126111611 (patch)
treedd2355141ef8aa8e0e4eaf175084e302c95c5434 /tty.c
parentcc967ffeb93438ff7ab5d9407bfbeb8d9f79658f (diff)
downloadrtmux-d4c2a935f2039e00a7a7384fa0427a6126111611.tar.gz
rtmux-d4c2a935f2039e00a7a7384fa0427a6126111611.tar.bz2
rtmux-d4c2a935f2039e00a7a7384fa0427a6126111611.zip
Sync OpenBSD patchset 1006:
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 'tty.c')
-rw-r--r--tty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tty.c b/tty.c
index a4e7d7b1..d248a889 100644
--- a/tty.c
+++ b/tty.c
@@ -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 */
}