The branch, master has been updated
       via  27364345bf68785af58131c47ef46ff081622537 (commit)
       via  35c19ffc284da8f37f62b1696f5d5d5e6ca2329c (commit)
       via  b0b5cad4968b09b805b475b41c0a9005f79c9563 (commit)
       via  965edf8a5c985d760b1e037be8182b353e9139c9 (commit)
       via  1c271852fc7464ecdff1697a66a8bc0eac44e90d (commit)
      from  7ea560261c72cd8e8453e7ea0e4f3922a2bdfeb3 (commit)

- Log -----------------------------------------------------------------
commit 27364345bf68785af58131c47ef46ff081622537
Author: Nicholas Marriott <[email protected]>
Commit: Nicholas Marriott <[email protected]>

    Don't add client formats when they are NULL.
---
 format.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/format.c b/format.c
index 8c4c784..16ac53d 100644
--- a/format.c
+++ b/format.c
@@ -346,8 +346,10 @@ format_client(struct format_tree *ft, struct client *c)
        format_add(ft, "client_cwd", "%s", c->cwd);
        format_add(ft, "client_height", "%u", c->tty.sy);
        format_add(ft, "client_width", "%u", c->tty.sx);
-       format_add(ft, "client_tty", "%s", c->tty.path);
-       format_add(ft, "client_termname", "%s", c->tty.termname);
+       if (c->tty.path != NULL)
+               format_add(ft, "client_tty", "%s", c->tty.path);
+       if (c->tty.termname != NULL)
+               format_add(ft, "client_termname", "%s", c->tty.termname);
 
        t = c->creation_time.tv_sec;
        format_add(ft, "client_created", "%lld", (long long) t);


commit 35c19ffc284da8f37f62b1696f5d5d5e6ca2329c
Author: Nicholas Marriott <[email protected]>
Commit: Nicholas Marriott <[email protected]>

    Missing space in refresh-client synopsis.
---
 cmd-refresh-client.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cmd-refresh-client.c b/cmd-refresh-client.c
index 7d9d539..70e6888 100644
--- a/cmd-refresh-client.c
+++ b/cmd-refresh-client.c
@@ -29,7 +29,7 @@ enum cmd_retval        cmd_refresh_client_exec(struct cmd *, 
struct cmd_q *);
 const struct cmd_entry cmd_refresh_client_entry = {
        "refresh-client", "refresh",
        "C:St:", 0, 0,
-       "[-S] [-C size]" CMD_TARGET_CLIENT_USAGE,
+       "[-S] [-C size] " CMD_TARGET_CLIENT_USAGE,
        0,
        NULL,
        NULL,


commit b0b5cad4968b09b805b475b41c0a9005f79c9563
Author: Nicholas Marriott <[email protected]>
Commit: Nicholas Marriott <[email protected]>

    Grouped sessions were being leaked on destroy, correctly free them.
---
 server-fn.c |    7 ++++---
 session.c   |    1 +
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/server-fn.c b/server-fn.c
index 86e2054..738a61d 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -398,14 +398,15 @@ void
 server_destroy_session_group(struct session *s)
 {
        struct session_group    *sg;
+       struct session          *s1;
 
        if ((sg = session_group_find(s)) == NULL)
                server_destroy_session(s);
        else {
-               TAILQ_FOREACH(s, &sg->sessions, gentry)
+               TAILQ_FOREACH_SAFE(s, &sg->sessions, gentry, s1) {
                        server_destroy_session(s);
-               TAILQ_REMOVE(&session_groups, sg, entry);
-               free(sg);
+                       session_destroy(s);
+               }
        }
 }
 
diff --git a/session.c b/session.c
index 74eb06a..24e2e5e 100644
--- a/session.c
+++ b/session.c
@@ -150,6 +150,7 @@ void
 session_destroy(struct session *s)
 {
        struct winlink  *wl;
+
        log_debug("session %s destroyed", s->name);
 
        RB_REMOVE(sessions, &sessions, s);


commit 965edf8a5c985d760b1e037be8182b353e9139c9
Author: Nicholas Marriott <[email protected]>
Commit: Nicholas Marriott <[email protected]>

    Make recalculate_sizes() handle an empty window with no active pane. This 
can
    happen when a window is in two sessions - it isn't destroyed immediately 
when
    the pane goes away but is left until the last session is destroyed. Fixes
    problems with grouped sessions reported by Daniel Ralston.
---
 resize.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/resize.c b/resize.c
index 5c365df..8d0bd27 100644
--- a/resize.c
+++ b/resize.c
@@ -92,7 +92,7 @@ recalculate_sizes(void)
 
        for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
                w = ARRAY_ITEM(&windows, i);
-               if (w == NULL)
+               if (w == NULL || w->active == NULL)
                        continue;
                flag = options_get_number(&w->options, "aggressive-resize");
 


commit 1c271852fc7464ecdff1697a66a8bc0eac44e90d
Author: Nicholas Marriott <[email protected]>
Commit: Nicholas Marriott <[email protected]>

    Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd can be
    NULL. Avoids crash when a command in a command client can't be parsed.
---
 cmd-queue.c |   16 ++++++++--------
 control.c   |    4 ++--
 tmux.h      |    2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/cmd-queue.c b/cmd-queue.c
index 243f73d..38a88d2 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -154,18 +154,15 @@ cmdq_error(struct cmd_q *cmdq, const char *fmt, ...)
 
 /* Print a guard line. */
 int
-cmdq_guard(struct cmd_q *cmdq, const char *guard)
+cmdq_guard(struct cmd_q *cmdq, const char *guard, int flags)
 {
        struct client   *c = cmdq->client;
-       int              flags;
 
        if (c == NULL)
                return 0;
        if (!(c->flags & CLIENT_CONTROL))
                return 0;
 
-       flags = !!(cmdq->cmd->flags & CMD_CONTROL);
-
        evbuffer_add_printf(c->stdout_data, "%%%s %ld %u %d\n", guard,
            (long) cmdq->time, cmdq->number, flags);
        server_push_stdout(c);
@@ -202,7 +199,7 @@ cmdq_continue(struct cmd_q *cmdq)
 {
        struct cmd_q_item       *next;
        enum cmd_retval          retval;
-       int                      empty, guard;
+       int                      empty, guard, flags;
        char                     s[1024];
 
        notify_disable();
@@ -228,13 +225,16 @@ cmdq_continue(struct cmd_q *cmdq)
                        cmdq->time = time(NULL);
                        cmdq->number++;
 
-                       guard = cmdq_guard(cmdq, "begin");
+                       flags = !!(cmdq->cmd->flags & CMD_CONTROL);
+                       guard = cmdq_guard(cmdq, "begin", flags);
+
                        retval = cmdq->cmd->entry->exec(cmdq->cmd, cmdq);
+
                        if (guard) {
                                if (retval == CMD_RETURN_ERROR)
-                                   cmdq_guard(cmdq, "error");
+                                       cmdq_guard(cmdq, "error", flags);
                                else
-                                   cmdq_guard(cmdq, "end");
+                                       cmdq_guard(cmdq, "end", flags);
                        }
 
                        if (retval == CMD_RETURN_ERROR)
diff --git a/control.c b/control.c
index aa79085..52fdb52 100644
--- a/control.c
+++ b/control.c
@@ -73,9 +73,9 @@ control_callback(struct client *c, int closed, unused void 
*data)
                        c->cmdq->time = time(NULL);
                        c->cmdq->number++;
 
-                       cmdq_guard(c->cmdq, "begin");
+                       cmdq_guard(c->cmdq, "begin", 1);
                        control_write(c, "parse error: %s", cause);
-                       cmdq_guard(c->cmdq, "error");
+                       cmdq_guard(c->cmdq, "error", 1);
 
                        free(cause);
                } else {
diff --git a/tmux.h b/tmux.h
index cc1c79e..1cb5cd8 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1868,7 +1868,7 @@ int                cmdq_free(struct cmd_q *);
 void printflike2 cmdq_print(struct cmd_q *, const char *, ...);
 void printflike2 cmdq_info(struct cmd_q *, const char *, ...);
 void printflike2 cmdq_error(struct cmd_q *, const char *, ...);
-int             cmdq_guard(struct cmd_q *, const char *);
+int             cmdq_guard(struct cmd_q *, const char *, int);
 void            cmdq_run(struct cmd_q *, struct cmd_list *);
 void            cmdq_append(struct cmd_q *, struct cmd_list *);
 int             cmdq_continue(struct cmd_q *);


-----------------------------------------------------------------------

Summary of changes:
 cmd-queue.c          |   16 ++++++++--------
 cmd-refresh-client.c |    2 +-
 control.c            |    4 ++--
 format.c             |    6 ++++--
 resize.c             |    2 +-
 server-fn.c          |    7 ++++---
 session.c            |    1 +
 tmux.h               |    2 +-
 8 files changed, 22 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to