summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--input.c12
-rw-r--r--names.c7
-rw-r--r--server.c9
-rw-r--r--tmux.h3
4 files changed, 15 insertions, 16 deletions
diff --git a/input.c b/input.c
index 0fb7f552..a80d664c 100644
--- a/input.c
+++ b/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.13 2009/08/18 21:41:13 nicm Exp $ */
+/* $Id: input.c,v 1.92 2009-08-19 09:04:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -235,8 +235,6 @@ input_init(struct window_pane *wp)
ictx->saved_cy = 0;
input_state(ictx, input_state_first);
-
- ictx->was = 0;
}
void
@@ -254,9 +252,8 @@ input_parse(struct window_pane *wp)
struct input_ctx *ictx = &wp->ictx;
u_char ch;
- if (BUFFER_USED(wp->in) == ictx->was)
+ if (BUFFER_USED(wp->in) == 0)
return;
- wp->window->flags |= WINDOW_ACTIVITY;
ictx->buf = BUFFER_OUT(wp->in);
ictx->len = BUFFER_USED(wp->in);
@@ -264,11 +261,15 @@ input_parse(struct window_pane *wp)
ictx->wp = wp;
+ log_debug2("entry; buffer=%zu", ictx->len);
+
if (wp->mode == NULL)
screen_write_start(&ictx->ctx, wp, &wp->base);
else
screen_write_start(&ictx->ctx, NULL, &wp->base);
+ if (ictx->off != ictx->len)
+ wp->window->flags |= WINDOW_ACTIVITY;
while (ictx->off < ictx->len) {
ch = ictx->buf[ictx->off++];
ictx->state(ch, ictx);
@@ -277,7 +278,6 @@ input_parse(struct window_pane *wp)
screen_write_stop(&ictx->ctx);
buffer_remove(wp->in, ictx->len);
- ictx->was = BUFFER_USED(wp->in);
}
void
diff --git a/names.c b/names.c
index e7c95f14..6a333a07 100644
--- a/names.c
+++ b/names.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: names.c,v 1.5 2009/08/18 21:18:20 nicm Exp $ */
+/* $Id: names.c,v 1.13 2009-08-19 09:04:48 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -42,6 +42,8 @@ set_window_names(void)
w = ARRAY_ITEM(&windows, i);
if (w == NULL || w->active == NULL)
continue;
+ if (!options_get_number(&w->options, "automatic-rename"))
+ continue;
if (timercmp(&tv, &w->name_timer, <))
continue;
@@ -50,9 +52,6 @@ set_window_names(void)
tv2.tv_usec = NAME_INTERVAL * 1000L;
timeradd(&w->name_timer, &tv2, &w->name_timer);
- if (!options_get_number(&w->options, "automatic-rename"))
- continue;
-
if (w->active->screen != &w->active->base)
name = NULL;
else
diff --git a/server.c b/server.c
index 7eb43875..2354b1fc 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.23 2009/08/18 21:37:04 nicm Exp $ */
+/* $Id: server.c,v 1.172 2009-08-19 09:04:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1109,12 +1109,13 @@ void
server_check_window(struct window *w)
{
struct window_pane *wp, *wq;
- struct options *oo = &w->options;
struct client *c;
struct session *s;
struct winlink *wl;
u_int i, j;
- int destroyed;
+ int destroyed, flag;
+
+ flag = options_get_number(&w->options, "remain-on-exit");
destroyed = 1;
@@ -1127,7 +1128,7 @@ server_check_window(struct window *w)
* the window to be destroyed (or it'll close when the last
* pane dies).
*/
- if (wp->fd == -1 && !options_get_number(oo, "remain-on-exit")) {
+ if (wp->fd == -1 && !flag) {
layout_close_pane(wp);
window_remove_pane(w, wp);
server_redraw_window(w);
diff --git a/tmux.h b/tmux.h
index db789cc9..80d7dfb6 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.86 2009/08/18 21:41:13 nicm Exp $ */
+/* $Id: tmux.h,v 1.420 2009-08-19 09:04:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -610,7 +610,6 @@ struct input_ctx {
u_char *buf;
size_t len;
size_t off;
- size_t was;
struct grid_cell cell;