diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-08-19 09:00:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-08-19 09:00:06 +0000 |
commit | 620402a833a4e42590a26390d2b7a39fd39e3ea9 (patch) | |
tree | e51054af412411f92f070c5cdc5b4fa53c79e1a0 /input.c | |
parent | 3f7e2589cdc27b59499806caa4d945f5c808d360 (diff) | |
download | rtmux-620402a833a4e42590a26390d2b7a39fd39e3ea9.tar.gz rtmux-620402a833a4e42590a26390d2b7a39fd39e3ea9.tar.bz2 rtmux-620402a833a4e42590a26390d2b7a39fd39e3ea9.zip |
This is a better fix for OS X stupidity.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: input.c,v 1.90 2009-08-09 17:32:06 tcunha Exp $ */ +/* $OpenBSD: input.c,v 1.13 2009/08/18 21:41:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -235,6 +235,8 @@ input_init(struct window_pane *wp) ictx->saved_cy = 0; input_state(ictx, input_state_first); + + ictx->was = 0; } void @@ -252,8 +254,9 @@ input_parse(struct window_pane *wp) struct input_ctx *ictx = &wp->ictx; u_char ch; - if (BUFFER_USED(wp->in) == 0) + if (BUFFER_USED(wp->in) == ictx->was) return; + wp->window->flags |= WINDOW_ACTIVITY; ictx->buf = BUFFER_OUT(wp->in); ictx->len = BUFFER_USED(wp->in); @@ -261,15 +264,11 @@ input_parse(struct window_pane *wp) ictx->wp = wp; - log_debug2("entry; buffer=%zu", ictx->len); - if (wp->mode == NULL) screen_write_start(&ictx->ctx, wp, &wp->base); else screen_write_start(&ictx->ctx, NULL, &wp->base); - if (ictx->off != ictx->len) - wp->window->flags |= WINDOW_ACTIVITY; while (ictx->off < ictx->len) { ch = ictx->buf[ictx->off++]; ictx->state(ch, ictx); @@ -278,6 +277,7 @@ input_parse(struct window_pane *wp) screen_write_stop(&ictx->ctx); buffer_remove(wp->in, ictx->len); + ictx->was = BUFFER_USED(wp->in); } void |