Do not strvis output to terminal from commands.

This commit is contained in:
nicm 2024-11-22 12:58:05 +00:00
parent 64d82d5988
commit 5fd45b3892
3 changed files with 5 additions and 5 deletions

View File

@ -835,9 +835,9 @@ cmdq_guard(struct cmdq_item *item, const char *guard, int flags)
/* Show message from command. */
void
cmdq_print_data(struct cmdq_item *item, int parse, struct evbuffer *evb)
cmdq_print_data(struct cmdq_item *item, struct evbuffer *evb)
{
server_client_print(item->client, parse, evb);
server_client_print(item->client, 1, evb);
}
/* Show message from command. */
@ -855,7 +855,7 @@ cmdq_print(struct cmdq_item *item, const char *fmt, ...)
evbuffer_add_vprintf(evb, fmt, ap);
va_end(ap);
cmdq_print_data(item, 0, evb);
cmdq_print_data(item, evb);
evbuffer_free(evb);
}

View File

@ -102,7 +102,7 @@ cmd_save_buffer_exec(struct cmd *self, struct cmdq_item *item)
if (evb == NULL)
fatalx("out of memory");
evbuffer_add(evb, bufdata, bufsize);
cmdq_print_data(item, 1, evb);
cmdq_print_data(item, evb);
evbuffer_free(evb);
return (CMD_RETURN_NORMAL);
}

2
tmux.h
View File

@ -2682,7 +2682,7 @@ u_int cmdq_next(struct client *);
struct cmdq_item *cmdq_running(struct client *);
void cmdq_guard(struct cmdq_item *, const char *, int);
void printflike(2, 3) cmdq_print(struct cmdq_item *, const char *, ...);
void cmdq_print_data(struct cmdq_item *, int, struct evbuffer *);
void cmdq_print_data(struct cmdq_item *, struct evbuffer *);
void printflike(2, 3) cmdq_error(struct cmdq_item *, const char *, ...);
/* cmd-wait-for.c */