mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Instead of sending all data to control mode clients as fast as possible,
add a limit of how much data will be sent to the client and try to use it for panes with some degree of fairness. GitHub issue 2217, with George Nachman.
This commit is contained in:
@ -780,7 +780,7 @@ cmdq_guard(struct cmdq_item *item, const char *guard, int flags)
|
||||
u_int number = item->number;
|
||||
|
||||
if (c != NULL && (c->flags & CLIENT_CONTROL))
|
||||
file_print(c, "%%%s %ld %u %d\n", guard, t, number, flags);
|
||||
control_write(c, "%%%s %ld %u %d", guard, t, number, flags);
|
||||
}
|
||||
|
||||
/* Show message from command. */
|
||||
@ -807,7 +807,10 @@ cmdq_print(struct cmdq_item *item, const char *fmt, ...)
|
||||
msg = utf8_sanitize(tmp);
|
||||
free(tmp);
|
||||
}
|
||||
file_print(c, "%s\n", msg);
|
||||
if (c->flags & CLIENT_CONTROL)
|
||||
control_write(c, "%s", msg);
|
||||
else
|
||||
file_print(c, "%s\n", msg);
|
||||
} else {
|
||||
wp = server_client_get_pane(c);
|
||||
wme = TAILQ_FIRST(&wp->modes);
|
||||
@ -849,7 +852,7 @@ cmdq_error(struct cmdq_item *item, const char *fmt, ...)
|
||||
free(tmp);
|
||||
}
|
||||
if (c->flags & CLIENT_CONTROL)
|
||||
file_print(c, "%s\n", msg);
|
||||
control_write(c, "%s", msg);
|
||||
else
|
||||
file_error(c, "%s\n", msg);
|
||||
c->retval = 1;
|
||||
|
Reference in New Issue
Block a user