Only do the automatic-rename dance if the pane has changed (seen output,

or new active pane).
pull/95/head
nicm 2015-08-28 07:49:24 +00:00
parent 2ffbd5b5f0
commit fc58e44f89
4 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -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);

1
tmux.h
View File

@ -826,6 +826,7 @@ struct window_pane {
#define PANE_RESIZE 0x8
#define PANE_FOCUSPUSH 0x10
#define PANE_INPUTOFF 0x20
#define PANE_CHANGED 0x40
int argc;
char **argv;

View File

@ -412,6 +412,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);
}