diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-10-01 23:50:24 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-10-01 23:50:24 +0100 |
commit | 13360ad54157790cbbaab757f659cb6d8a4ce2c4 (patch) | |
tree | 848e4df56152b0cd46fd3c855b95394bf4b815a4 | |
parent | 9389cfbec9d7f4a7b5f9d4a580428949db4f6e67 (diff) | |
parent | 7be152412ea0a614df11bce9ba5097574369a5f6 (diff) | |
download | rtmux-13360ad54157790cbbaab757f659cb6d8a4ce2c4.tar.gz rtmux-13360ad54157790cbbaab757f659cb6d8a4ce2c4.tar.bz2 rtmux-13360ad54157790cbbaab757f659cb6d8a4ce2c4.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
-rw-r--r-- | cmd-if-shell.c | 3 | ||||
-rw-r--r-- | cmd-queue.c | 4 | ||||
-rw-r--r-- | cmd-source-file.c | 3 | ||||
-rw-r--r-- | cmd-split-window.c | 2 | ||||
-rw-r--r-- | cmd-wait-for.c | 2 | ||||
-rw-r--r-- | format.c | 2 | ||||
-rw-r--r-- | layout.c | 3 | ||||
-rw-r--r-- | tmux.1 | 2 | ||||
-rw-r--r-- | tmux.c | 6 |
9 files changed, 19 insertions, 8 deletions
diff --git a/cmd-if-shell.c b/cmd-if-shell.c index a074341b..9b6dcf30 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -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); diff --git a/cmd-queue.c b/cmd-queue.c index 808d4dc0..bbc9971f 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -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 */ diff --git a/cmd-source-file.c b/cmd-source-file.c index d636643d..eb7e1490 100644 --- a/cmd-source-file.c +++ b/cmd-source-file.c @@ -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--; diff --git a/cmd-split-window.c b/cmd-split-window.c index 039d7fce..a2403253 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -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 }; diff --git a/cmd-wait-for.c b/cmd-wait-for.c index e87e197a..e251863d 100644 --- a/cmd-wait-for.c +++ b/cmd-wait-for.c @@ -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 @@ -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); } @@ -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) { @@ -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 ) @@ -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); } } |