aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-10-01 23:50:24 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-10-01 23:50:24 +0100
commit13360ad54157790cbbaab757f659cb6d8a4ce2c4 (patch)
tree848e4df56152b0cd46fd3c855b95394bf4b815a4
parent9389cfbec9d7f4a7b5f9d4a580428949db4f6e67 (diff)
parent7be152412ea0a614df11bce9ba5097574369a5f6 (diff)
downloadrtmux-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.c3
-rw-r--r--cmd-queue.c4
-rw-r--r--cmd-source-file.c3
-rw-r--r--cmd-split-window.c2
-rw-r--r--cmd-wait-for.c2
-rw-r--r--format.c2
-rw-r--r--layout.c3
-rw-r--r--tmux.12
-rw-r--r--tmux.c6
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
diff --git a/format.c b/format.c
index da939f04..ba4b95b2 100644
--- a/format.c
+++ b/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);
}
diff --git a/layout.c b/layout.c
index b74bd789..cf554c38 100644
--- a/layout.c
+++ b/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) {
diff --git a/tmux.1 b/tmux.1
index bbe9beb5..ba5fe187 100644
--- a/tmux.1
+++ b/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 )
diff --git a/tmux.c b/tmux.c
index 606c574f..9c81cff5 100644
--- a/tmux.c
+++ b/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);
}
}