=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.273 retrieving revision 1.274 diff -c -r1.273 -r1.274 *** src/usr.bin/tmux/tty.c 2017/05/11 11:38:49 1.273 --- src/usr.bin/tmux/tty.c 2017/05/12 10:49:04 1.274 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.273 2017/05/11 11:38:49 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.274 2017/05/12 10:49:04 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 798,803 **** --- 798,804 ---- u_int ny, u_int px, u_int nx, u_int bg) { u_int yy; + char tmp[64]; log_debug("%s: %u,%u at %u,%u", __func__, nx, ny, px, py); *************** *** 813,818 **** --- 814,830 ---- tty_term_has(tty->term, TTYC_ED)) { tty_cursor(tty, 0, py); tty_putcode(tty, TTYC_ED); + return; + } + + /* + * If we're setting a background colour (so it is not default), + * we can use DECFRA. + */ + if (tty->term_type == TTY_VT420 && bg != 8) { + xsnprintf(tmp, sizeof tmp, "\033[32;%u;%u;%u;%u$x", + py + 1, px + 1, py + ny, px + nx); + tty_puts(tty, tmp); return; } }