mirror of https://github.com/tmux/tmux.git
Merge branch 'obsd-master'
commit
151875d144
|
@ -761,6 +761,7 @@ args_make_commands_prepare(struct cmd *self, struct cmdq_item *item, u_int idx,
|
||||||
struct args_value *value;
|
struct args_value *value;
|
||||||
struct args_command_state *state;
|
struct args_command_state *state;
|
||||||
const char *cmd;
|
const char *cmd;
|
||||||
|
const char *file;
|
||||||
|
|
||||||
state = xcalloc(1, sizeof *state);
|
state = xcalloc(1, sizeof *state);
|
||||||
|
|
||||||
|
@ -787,7 +788,8 @@ args_make_commands_prepare(struct cmd *self, struct cmdq_item *item, u_int idx,
|
||||||
|
|
||||||
if (wait)
|
if (wait)
|
||||||
state->pi.item = item;
|
state->pi.item = item;
|
||||||
cmd_get_source(self, &state->pi.file, &state->pi.line);
|
cmd_get_source(self, &file, &state->pi.line);
|
||||||
|
state->pi.file = xstrdup(file);
|
||||||
state->pi.c = tc;
|
state->pi.c = tc;
|
||||||
if (state->pi.c != NULL)
|
if (state->pi.c != NULL)
|
||||||
state->pi.c->references++;
|
state->pi.c->references++;
|
||||||
|
@ -842,6 +844,7 @@ args_make_commands_free(struct args_command_state *state)
|
||||||
cmd_list_free(state->cmdlist);
|
cmd_list_free(state->cmdlist);
|
||||||
if (state->pi.c != NULL)
|
if (state->pi.c != NULL)
|
||||||
server_client_unref(state->pi.c);
|
server_client_unref(state->pi.c);
|
||||||
|
free((void *)state->pi.file);
|
||||||
free(state->cmd);
|
free(state->cmd);
|
||||||
free(state);
|
free(state);
|
||||||
}
|
}
|
||||||
|
|
25
status.c
25
status.c
|
@ -472,17 +472,26 @@ void
|
||||||
status_message_set(struct client *c, int delay, int ignore_styles,
|
status_message_set(struct client *c, int delay, int ignore_styles,
|
||||||
int ignore_keys, const char *fmt, ...)
|
int ignore_keys, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
char *s;
|
||||||
|
|
||||||
|
va_start(ap, fmt);
|
||||||
|
xvasprintf(&s, fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
log_debug("%s: %s", __func__, s);
|
||||||
|
|
||||||
|
if (c == NULL) {
|
||||||
|
server_add_message("message: %s", s);
|
||||||
|
free(s);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
status_message_clear(c);
|
status_message_clear(c);
|
||||||
status_push_screen(c);
|
status_push_screen(c);
|
||||||
|
c->message_string = s;
|
||||||
va_start(ap, fmt);
|
server_add_message("%s message: %s", c->name, s);
|
||||||
xvasprintf(&c->message_string, fmt, ap);
|
|
||||||
va_end(ap);
|
|
||||||
|
|
||||||
server_add_message("%s message: %s", c->name, c->message_string);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* With delay -1, the display-time option is used; zero means wait for
|
* With delay -1, the display-time option is used; zero means wait for
|
||||||
|
|
|
@ -226,7 +226,7 @@ static const struct tty_feature tty_feature_strikethrough = {
|
||||||
|
|
||||||
/* Terminal supports synchronized updates. */
|
/* Terminal supports synchronized updates. */
|
||||||
static const char *const tty_feature_sync_capabilities[] = {
|
static const char *const tty_feature_sync_capabilities[] = {
|
||||||
"Sync=\\EP=%p1%ds\\E\\\\",
|
"Sync=\\E[?2026%?%p1%{1}%-%tl%eh%;",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
static const struct tty_feature tty_feature_sync = {
|
static const struct tty_feature tty_feature_sync = {
|
||||||
|
|
Loading…
Reference in New Issue