summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2016-03-03 12:58:15 +0000
committernicm <nicm@openbsd.org>2016-03-03 12:58:15 +0000
commitd4fb684cf04000833e101663a426525df853a7a7 (patch)
tree1e7d04032eae15a323fe38bd8109de9798fa4e3c /usr.bin/tmux/tty.c
parentKill IPv6 prefix and router renumbering ioctls. (diff)
downloadwireguard-openbsd-d4fb684cf04000833e101663a426525df853a7a7.tar.xz
wireguard-openbsd-d4fb684cf04000833e101663a426525df853a7a7.zip
RGB colours shouldn't be mixed up with aixterm colours, return before
that happens when working out if they are supported.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 33c0012f409..5e795e70c30 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.199 2016/01/29 11:13:56 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.200 2016/03/03 12:58:15 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1569,6 +1569,8 @@ tty_check_fg(struct tty *tty, struct grid_cell *gc)
gc->flags |= GRID_FLAG_FG256;
gc->fg = colour_find_rgb(rgb->r, rgb->g, rgb->b);
}
+ else
+ return;
}
colours = tty_term_number(tty->term, TTYC_COLORS);
@@ -1612,6 +1614,8 @@ tty_check_bg(struct tty *tty, struct grid_cell *gc)
gc->flags |= GRID_FLAG_BG256;
gc->bg = colour_find_rgb(rgb->r, rgb->g, rgb->b);
}
+ else
+ return;
}
colours = tty_term_number(tty->term, TTYC_COLORS);