summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2016-07-15 00:49:09 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2016-07-15 00:49:09 +0000
commita1583f41e2063c2f9e0b8d8578dd2f6a126bba48 (patch)
treefbb4ae64ecad43da42f655935cba28dc60292383 /usr.bin/tmux/tty.c
parentc86123dfcc50c7b6210c9b4ad9e653ad94395dd9 (diff)
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))