diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-04-24 20:29:25 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-04-24 20:29:25 +0000 |
commit | edb6bec61bdb6c7b5ba2ca7ea7f3f09bf89ff0e5 (patch) | |
tree | 4b66e0503b1f37c0a6c0e58ef68b91ff60212bfd /usr.bin/tmux/tty.c | |
parent | 9c7db0ce0f14aa9841099233ad3d89479eaa8cc1 (diff) |
Use setaf/setab for aixterm colours, from Ailin Nemui.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index fbf706cd6c2..c6a2df97feb 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.320 2019/04/17 14:43:49 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.321 2019/04/24 20:29:24 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -2388,8 +2388,7 @@ tty_colours_fg(struct tty *tty, const struct grid_cell *gc) /* Is this an aixterm bright colour? */ if (gc->fg >= 90 && gc->fg <= 97) { - xsnprintf(s, sizeof s, "\033[%dm", gc->fg); - tty_puts(tty, s); + tty_putcode1(tty, TTYC_SETAF, gc->fg - 90 + 8); goto save_fg; } @@ -2417,8 +2416,7 @@ tty_colours_bg(struct tty *tty, const struct grid_cell *gc) /* Is this an aixterm bright colour? */ if (gc->bg >= 90 && gc->bg <= 97) { - xsnprintf(s, sizeof s, "\033[%dm", gc->bg + 10); - tty_puts(tty, s); + tty_putcode1(tty, TTYC_SETAB, gc->bg - 90 + 8); goto save_bg; } |