From 5fd00ece6e9ad9ee343097d44aa417262aa58d71 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 15 Jul 2016 00:49:08 +0000 Subject: 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). --- usr.bin/tmux/tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux/tty.c') 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 @@ -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)) -- cgit v1.2.3-59-g8ed1b