mirror of
https://github.com/tmux/tmux.git
synced 2025-04-14 07:18:49 +00:00
Add time and a command count to control mode guards, based on code from
George Nachman.
This commit is contained in:
parent
e0961dfdf4
commit
8a40e10d55
@ -68,8 +68,13 @@ control_callback(struct client *c, int closed, unused void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cmd_string_parse(line, &cmdlist, NULL, 0, &cause) != 0) {
|
if (cmd_string_parse(line, &cmdlist, NULL, 0, &cause) != 0) {
|
||||||
control_write(c, "%%error in line \"%s\": %s", line,
|
c->cmdq->time = time(NULL);
|
||||||
cause);
|
c->cmdq->number++;
|
||||||
|
|
||||||
|
cmdq_guard(c->cmdq, "begin");
|
||||||
|
control_write(c, "parse error: %s", cause);
|
||||||
|
cmdq_guard(c->cmdq, "error");
|
||||||
|
|
||||||
free(cause);
|
free(cause);
|
||||||
} else {
|
} else {
|
||||||
cmdq_run(c->cmdq, cmdlist);
|
cmdq_run(c->cmdq, cmdlist);
|
||||||
|
Loading…
Reference in New Issue
Block a user