summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2016-07-15 00:49:08 +0000
committernicm <nicm@openbsd.org>2016-07-15 00:49:08 +0000
commit5fd00ece6e9ad9ee343097d44aa417262aa58d71 (patch)
tree35435c664c77fd15e674a4de53c0befeb1108bca /usr.bin/tmux/tty.c
parentInstead of representing colours in several different forms with various (diff)
downloadwireguard-openbsd-5fd00ece6e9ad9ee343097d44aa417262aa58d71.tar.xz
wireguard-openbsd-5fd00ece6e9ad9ee343097d44aa417262aa58d71.zip
Don't update cells in each block of data read from a pane immediately,
instead track them as change (dirty) and update them once at the end, saves much time if repeatedly writing the same cell. Also fix comparison of cells being equal in a few places (memcmp is not enough).
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 8c143a74426..c7c6500259e 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.204 2016/07/15 00:42:56 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.205 2016/07/15 00:49:08 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1175,7 +1175,7 @@ tty_reset(struct tty *tty)
{
struct grid_cell *gc = &tty->cell;
- if (memcmp(gc, &grid_default_cell, sizeof *gc) == 0)
+ if (grid_cells_equal(gc, &grid_default_cell))
return;
if ((gc->attr & GRID_ATTR_CHARSET) && tty_use_acs(tty))