Check changed flag after restarting timer.

This commit is contained in:
nicm 2015-08-28 13:26:41 +00:00
parent f957db81d9
commit b0940bdf54

View File

@ -50,10 +50,6 @@ window_name_callback(unused int fd, unused short events, void *data)
if (w->active == NULL) if (w->active == NULL)
return; return;
if (~w->active->flags & PANE_CHANGED)
return;
w->active->flags &= ~PANE_CHANGED;
if (!options_get_number(&w->options, "automatic-rename")) { if (!options_get_number(&w->options, "automatic-rename")) {
if (event_initialized(&w->name_timer)) if (event_initialized(&w->name_timer))
event_del(&w->name_timer); event_del(&w->name_timer);
@ -61,6 +57,10 @@ window_name_callback(unused int fd, unused short events, void *data)
} }
queue_window_name(w); queue_window_name(w);
if (~w->active->flags & PANE_CHANGED)
return;
w->active->flags &= ~PANE_CHANGED;
name = format_window_name(w); name = format_window_name(w);
if (strcmp(name, w->name) != 0) { if (strcmp(name, w->name) != 0) {
window_set_name(w, name); window_set_name(w, name);