diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-02-10 15:39:44 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-02-10 15:39:44 +0000 |
commit | 37cfc122d8f82dee764b443a9f148b88077efa80 (patch) | |
tree | e01f3c0f2bef26b51ca98e44a765e8006a45dc4e | |
parent | f33a26c4629f61c55d819c1a8f578f3c8df68334 (diff) |
Add not delete the event if more to write.
-rw-r--r-- | usr.bin/tmux/tty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 964275d00a4..e83f0350609 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.246 2017/02/10 15:39:14 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.247 2017/02/10 15:39:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -182,8 +182,8 @@ tty_write_callback(__unused int fd, __unused short events, void *data) return; log_debug("%s: wrote %d bytes (of %zu)", tty->path, nwrite, size); - if (EVBUFFER_LENGTH(tty->out) == 0) - event_del(&tty->event_out); + if (EVBUFFER_LENGTH(tty->out) != 0) + event_add(&tty->event_out, NULL); } int |