diff --git a/input.c b/input.c index 7a334810..7ec35c88 100644 --- a/input.c +++ b/input.c @@ -844,6 +844,8 @@ input_parse(struct window_pane *wp) if (EVBUFFER_LENGTH(evb) == 0) return; + wp->flags |= PANE_CHANGED; + wp->window->flags |= WINDOW_ACTIVITY; wp->window->flags &= ~WINDOW_SILENCE; diff --git a/names.c b/names.c index 1ceb83c0..0a3af903 100644 --- a/names.c +++ b/names.c @@ -50,6 +50,10 @@ window_name_callback(unused int fd, unused short events, void *data) if (w->active == NULL) return; + if (~w->active->flags & PANE_CHANGED) + return; + w->active->flags &= ~PANE_CHANGED; + if (!options_get_number(&w->options, "automatic-rename")) { if (event_initialized(&w->name_timer)) event_del(&w->name_timer); diff --git a/server-window.c b/server-window.c index 1b3938d3..c96c2602 100644 --- a/server-window.c +++ b/server-window.c @@ -147,7 +147,7 @@ server_window_check_silence(struct session *s, struct winlink *wl) * from this window. */ if (gettimeofday(&w->silence_timer, NULL) != 0) - fatal("gettimeofday failed."); + fatal("gettimeofday failed"); return (0); } diff --git a/tmux.h b/tmux.h index b9a663c5..44997311 100644 --- a/tmux.h +++ b/tmux.h @@ -830,6 +830,7 @@ struct window_pane { #define PANE_RESIZE 0x8 #define PANE_FOCUSPUSH 0x10 #define PANE_INPUTOFF 0x20 +#define PANE_CHANGED 0x40 int argc; char **argv; diff --git a/window.c b/window.c index 1a6d74e6..525dad51 100644 --- a/window.c +++ b/window.c @@ -411,6 +411,7 @@ window_set_active_pane(struct window *w, struct window_pane *wp) return (1); } w->active->active_point = next_active_point++; + w->active->flags |= PANE_CHANGED; return (1); } @@ -947,7 +948,7 @@ window_pane_read_callback(unused struct bufferevent *bufev, void *data) */ wp->window->flags |= WINDOW_SILENCE; if (gettimeofday(&wp->window->silence_timer, NULL) != 0) - fatal("gettimeofday failed."); + fatal("gettimeofday failed"); return; start_timer: