diff options
author | 2019-04-24 20:29:24 +0000 | |
---|---|---|
committer | 2019-04-24 20:29:24 +0000 | |
commit | c366c94c6507af5f4bde211bc66d230e127f9de1 (patch) | |
tree | e4ea31b95a5c6d6d5535b294a3e5526adaadd9da /usr.bin/tmux/tty.c | |
parent | New product id for the USB serial adapter found in Juniper SRX 300. (diff) | |
download | wireguard-openbsd-c366c94c6507af5f4bde211bc66d230e127f9de1.tar.xz wireguard-openbsd-c366c94c6507af5f4bde211bc66d230e127f9de1.zip |
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; } |