Skip to content

Commit

Permalink
Merge branch 'obsd-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasAdam committed Mar 26, 2013
2 parents 00af2df + dfac36b commit 399a15b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
1 change: 1 addition & 0 deletions cmd-queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <ctype.h>
#include <stdlib.h>
#include <time.h>

#include "tmux.h"

Expand Down
4 changes: 0 additions & 4 deletions control-notify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions control.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <event.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#include "tmux.h"

Expand Down
8 changes: 5 additions & 3 deletions tty-keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -508,7 +508,7 @@ tty_keys_next(struct tty *tty)
}

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;
Expand Down Expand Up @@ -540,8 +540,10 @@ tty_keys_next(struct tty *tty)
/* 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);
}

Expand Down
9 changes: 4 additions & 5 deletions window.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,19 +493,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);

Expand Down

0 comments on commit 399a15b

Please sign in to comment.