mirror of
https://github.com/tmux/tmux.git
synced 2024-12-24 18:28:56 +00:00
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
This commit is contained in:
commit
13360ad541
@ -147,6 +147,9 @@ cmd_if_shell_done(struct cmd_q *cmdq1)
|
||||
struct cmd_if_shell_data *cdata = cmdq1->data;
|
||||
struct cmd_q *cmdq = cdata->cmdq;
|
||||
|
||||
if (cmdq1->client_exit >= 0)
|
||||
cmdq->client_exit = cmdq1->client_exit;
|
||||
|
||||
if (!cmdq_free(cmdq) && !cdata->bflag)
|
||||
cmdq_continue(cmdq);
|
||||
|
||||
|
@ -35,7 +35,7 @@ cmdq_new(struct client *c)
|
||||
cmdq->dead = 0;
|
||||
|
||||
cmdq->client = c;
|
||||
cmdq->client_exit = 0;
|
||||
cmdq->client_exit = -1;
|
||||
|
||||
TAILQ_INIT(&cmdq->queue);
|
||||
cmdq->item = NULL;
|
||||
@ -259,7 +259,7 @@ cmdq_continue(struct cmd_q *cmdq)
|
||||
} while (cmdq->item != NULL);
|
||||
|
||||
empty:
|
||||
if (cmdq->client_exit)
|
||||
if (cmdq->client_exit > 0)
|
||||
cmdq->client->flags |= CLIENT_EXIT;
|
||||
if (cmdq->emptyfn != NULL)
|
||||
cmdq->emptyfn(cmdq); /* may free cmdq */
|
||||
|
@ -95,6 +95,9 @@ cmd_source_file_done(struct cmd_q *cmdq1)
|
||||
{
|
||||
struct cmd_q *cmdq = cmdq1->data;
|
||||
|
||||
if (cmdq1->client_exit >= 0)
|
||||
cmdq->client_exit = cmdq1->client_exit;
|
||||
|
||||
cmdq_free(cmdq1);
|
||||
|
||||
cfg_references--;
|
||||
|
@ -36,7 +36,7 @@ const struct cmd_entry cmd_split_window_entry = {
|
||||
"[-dhvP] [-c start-directory] [-F format] [-p percentage|-l size] "
|
||||
CMD_TARGET_PANE_USAGE " [command]",
|
||||
0,
|
||||
NULL,
|
||||
cmd_split_window_key_binding,
|
||||
cmd_split_window_exec
|
||||
};
|
||||
|
||||
|
@ -33,7 +33,7 @@ enum cmd_retval cmd_wait_for_exec(struct cmd *, struct cmd_q *);
|
||||
const struct cmd_entry cmd_wait_for_entry = {
|
||||
"wait-for", "wait",
|
||||
"LSU", 1, 1,
|
||||
"[-LSU] channel",
|
||||
"[-L|-S|-U] channel",
|
||||
0,
|
||||
NULL,
|
||||
cmd_wait_for_exec
|
||||
|
2
format.c
2
format.c
@ -121,7 +121,7 @@ format_create(void)
|
||||
|
||||
if (gethostname(host, sizeof host) == 0) {
|
||||
format_add(ft, "host", "%s", host);
|
||||
if ((ptr = strrchr(host, '.')) != NULL)
|
||||
if ((ptr = strchr(host, '.')) != NULL)
|
||||
*ptr = '\0';
|
||||
format_add(ft, "host_short", "%s", host);
|
||||
}
|
||||
|
3
layout.c
3
layout.c
@ -533,6 +533,9 @@ layout_resize_pane_mouse(struct client *c)
|
||||
pane_border = 0;
|
||||
if (m->event & MOUSE_EVENT_DRAG && m->flags & MOUSE_RESIZE_PANE) {
|
||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||
if (!window_pane_visible(wp))
|
||||
continue;
|
||||
|
||||
if (wp->xoff + wp->sx == m->lx &&
|
||||
wp->yoff <= 1 + m->ly &&
|
||||
wp->yoff + wp->sy >= m->ly) {
|
||||
|
2
tmux.1
2
tmux.1
@ -3583,7 +3583,7 @@ If the command doesn't return success, the exit status is also displayed.
|
||||
.D1 (alias: Ic info )
|
||||
Show server information and terminal details.
|
||||
.It Xo Ic wait-for
|
||||
.Fl LSU
|
||||
.Op Fl L | S | U
|
||||
.Ar channel
|
||||
.Xc
|
||||
.D1 (alias: Ic wait )
|
||||
|
6
tmux.c
6
tmux.c
@ -184,7 +184,8 @@ makesocketpath(const char *label)
|
||||
errno = ENOTDIR;
|
||||
return (NULL);
|
||||
}
|
||||
if (sb.st_uid != uid || (sb.st_mode & (S_IRWXG|S_IRWXO)) != 0) {
|
||||
if (sb.st_uid != uid || (!S_ISDIR(sb.st_mode) &&
|
||||
sb.st_mode & (S_IRWXG|S_IRWXO)) != 0) {
|
||||
errno = EACCES;
|
||||
return (NULL);
|
||||
}
|
||||
@ -387,7 +388,8 @@ main(int argc, char **argv)
|
||||
/* -L or default set. */
|
||||
if (label != NULL) {
|
||||
if ((path = makesocketpath(label)) == NULL) {
|
||||
fprintf(stderr, "can't create socket\n");
|
||||
fprintf(stderr, "can't create socket: %s\n",
|
||||
strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user