summaryrefslogtreecommitdiffstats
path: root/server-fn.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-09-03 08:48:57 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-09-03 08:48:57 +0000
commit2e43372d0b2932f7abf5b16544faec3ecf214433 (patch)
tree935cbe37a1c8ec6e4e79b737b5941383c5d3a824 /server-fn.c
parent473911fb731eb740d1c468350eda334638902d94 (diff)
If stdin in the client is enable immediately, tmux will eat anything
sent to stdin before it is needed, which can be inconvenient (eg pasting commands). Instead, start with stdin disabled and reuse MSG_STDIN from server->client to mean that stdin should be enabled. Based on a diff from Chris Johnsen.
Diffstat (limited to 'server-fn.c')
-rw-r--r--server-fn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/server-fn.c b/server-fn.c
index bea64178..c22095dc 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -581,5 +581,8 @@ server_set_stdin_callback(struct client *c, void (*cb)(struct client *, int,
if (c->stdin_closed)
c->stdin_callback (c, 1, c->stdin_callback_data);
+
+ server_write_client(c, MSG_STDIN, NULL, 0);
+
return (0);
}