=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.290 retrieving revision 1.291 diff -c -r1.290 -r1.291 *** src/usr.bin/tmux/tty.c 2017/06/06 14:53:28 1.290 --- src/usr.bin/tmux/tty.c 2017/07/21 14:25:29 1.291 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.290 2017/06/06 14:53:28 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.291 2017/07/21 14:25:29 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 885,891 **** u_int i, j, sx, nx, width; int flags, cleared = 0; char buf[512]; ! size_t len; flags = (tty->flags & TTY_NOCURSOR); tty->flags |= TTY_NOCURSOR; --- 885,891 ---- u_int i, j, sx, nx, width; int flags, cleared = 0; char buf[512]; ! size_t len, old_len; flags = (tty->flags & TTY_NOCURSOR); tty->flags |= TTY_NOCURSOR; *************** *** 973,980 **** } } if (len != 0) { ! tty_attributes(tty, &last, wp); ! tty_putn(tty, buf, len, width); } nx = screen_size_x(s) - sx; --- 973,989 ---- } } if (len != 0) { ! if (grid_cells_equal(&last, &grid_default_cell)) { ! old_len = len; ! while (len > 0 && buf[len - 1] == ' ') ! len--; ! log_debug("%s: trimmed %zu spaces", __func__, ! old_len - len); ! } ! if (len != 0) { ! tty_attributes(tty, &last, wp); ! tty_putn(tty, buf, len, width); ! } } nx = screen_size_x(s) - sx;