The branch, master has been updated
       via  399a15b9fc06bee7860d7e29c8315776ed87beea (commit)
       via  dfac36b6c3d72ac3732ec2c638b8bae16d1a01ae (commit)
       via  771d7db3a6e19cd773b2f1a2547ec3db5f75b07f (commit)
      from  00af2df1027301a31531321c12eae6ff32989a3a (commit)

- Log -----------------------------------------------------------------
commit 399a15b9fc06bee7860d7e29c8315776ed87beea
Merge: 00af2df dfac36b
Author: Thomas <[email protected]>
Commit: Thomas <[email protected]>

    Merge branch 'obsd-master'

 cmd-queue.c      |    1 +
 control-notify.c |    4 ----
 control.c        |    1 +
 tty-keys.c       |    8 +++++---
 window.c         |    9 ++++-----
 5 files changed, 11 insertions(+), 12 deletions(-)



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

    Only accept partial keys if the timer has not expired, fixes infinite
    loop when Escape is pressed the wrong number of times.
---
 tty-keys.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tty-keys.c b/tty-keys.c
index 33539d1..26edbf3 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -448,7 +448,7 @@ tty_keys_next(struct tty *tty)
        const char      *buf;
        size_t           len, size;
        cc_t             bspace;
-       int              key, delay;
+       int              key, delay, expired = 0;
 
        /* Get key buffer. */
        buf = EVBUFFER_DATA(tty->event->input);
@@ -508,7 +508,7 @@ first_key:
                }
 
                tk = tty_keys_find(tty, buf + 1, len - 1, &size);
-               if (tk != NULL) {
+               if (tk != NULL && (!expired || tk->next == NULL)) {
                        size++; /* include escape */
                        if (tk->next != NULL)
                                goto partial_key;
@@ -540,8 +540,10 @@ partial_key:
        /* If timer is going, check for expiration. */
        if (tty->flags & TTY_TIMER) {
                if (evtimer_initialized(&tty->key_timer) &&
-                   !evtimer_pending(&tty->key_timer, NULL))
+                   !evtimer_pending(&tty->key_timer, NULL)) {
+                       expired = 1;
                        goto first_key;
+               }
                return (0);
        }
 


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

    Fix compiler warnings, missing #include. From Thomas Adam.
---
 cmd-queue.c      |    1 +
 control-notify.c |    4 ----
 control.c        |    1 +
 window.c         |    9 ++++-----
 4 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/cmd-queue.c b/cmd-queue.c
index 8bcc919..b1c0a4e 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -20,6 +20,7 @@
 
 #include <ctype.h>
 #include <stdlib.h>
+#include <time.h>
 
 #include "tmux.h"
 
diff --git a/control-notify.c b/control-notify.c
index 0931c23..a298cdc 100644
--- a/control-notify.c
+++ b/control-notify.c
@@ -99,14 +99,12 @@ void
 control_notify_window_unlinked(unused struct session *s, struct window *w)
 {
        struct client   *c;
-       struct session  *cs;
        u_int            i;
 
        for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                c = ARRAY_ITEM(&clients, i);
                if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
                        continue;
-               cs = c->session;
 
                control_write(c, "%%window-close @%u", w->id);
        }
@@ -136,14 +134,12 @@ void
 control_notify_window_renamed(struct window *w)
 {
        struct client   *c;
-       struct session  *s;
        u_int            i;
 
        for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                c = ARRAY_ITEM(&clients, i);
                if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
                        continue;
-               s = c->session;
 
                control_write(c, "%%window-renamed @%u %s", w->id, w->name);
        }
diff --git a/control.c b/control.c
index e78186e..8986f5c 100644
--- a/control.c
+++ b/control.c
@@ -22,6 +22,7 @@
 #include <event.h>
 #include <stdlib.h>
 #include <string.h>
+#include <time.h>
 
 #include "tmux.h"
 
diff --git a/window.c b/window.c
index 0f445ed..3b6b74b 100644
--- a/window.c
+++ b/window.c
@@ -496,19 +496,18 @@ window_zoom(struct window_pane *wp)
 int
 window_unzoom(struct window *w)
 {
-       struct window_pane      *wp, *wp1;
+       struct window_pane      *wp;
 
        if (!(w->flags & WINDOW_ZOOMED))
                return (-1);
-       wp = w->active;
 
        w->flags &= ~WINDOW_ZOOMED;
        layout_free(w);
        w->layout_root = w->saved_layout_root;
 
-       TAILQ_FOREACH(wp1, &w->panes, entry) {
-               wp1->layout_cell = wp1->saved_layout_cell;
-               wp1->saved_layout_cell = NULL;
+       TAILQ_FOREACH(wp, &w->panes, entry) {
+               wp->layout_cell = wp->saved_layout_cell;
+               wp->saved_layout_cell = NULL;
        }
        layout_fix_panes(w, w->sx, w->sy);
 


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

Summary of changes:
 cmd-queue.c      |    1 +
 control-notify.c |    4 ----
 control.c        |    1 +
 tty-keys.c       |    8 +++++---
 window.c         |    9 ++++-----
 5 files changed, 11 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to