[BACK]Return to cmd-set-option.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-set-option.c between version 1.23 and 1.24

version 1.23, 2009/10/10 15:03:01 version 1.24, 2009/11/01 23:20:37
Line 108 
Line 108 
         struct client                   *c;          struct client                   *c;
         struct options                  *oo;          struct options                  *oo;
         const struct set_option_entry   *entry, *opt;          const struct set_option_entry   *entry, *opt;
           struct jobs                     *jobs;
           struct job                      *job, *nextjob;
         u_int                            i;          u_int                            i;
           int                              try_again;
   
         if (data->chflags & CMD_CHFLAG('g'))          if (data->chflags & CMD_CHFLAG('g'))
                 oo = &global_s_options;                  oo = &global_s_options;
Line 184 
Line 187 
         }          }
   
         recalculate_sizes();          recalculate_sizes();
         for (i = 0; i < ARRAY_LENGTH(&clients); i++) {  
                 c = ARRAY_ITEM(&clients, i);          /*
                 if (c != NULL && c->session != NULL) {           * Special-case: kill all persistent jobs if status-left, status-right
                         job_tree_free(&c->status_jobs);           * or set-titles-string have changed. Persistent jobs are only used by
                         job_tree_init(&c->status_jobs);           * the status line at the moment so this works XXX.
            */
           if (strcmp(entry->name, "status-left") == 0 ||
               strcmp(entry->name, "status-right") == 0 ||
               strcmp(entry->name, "set-titles-string") == 0) {
                   for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                           c = ARRAY_ITEM(&clients, i);
                           if (c == NULL || c->session == NULL)
                                   continue;
   
                           jobs = &c->status_jobs;
                           do {
                                   try_again = 0;
                                   job = RB_ROOT(jobs);
                                   while (job != NULL) {
                                           nextjob = RB_NEXT(jobs, jobs, job);
                                           if (job->flags & JOB_PERSIST) {
                                                   job_remove(jobs, job);
                                                   try_again = 1;
                                                   break;
                                           }
                                           job = nextjob;
                                   }
                           } while (try_again);
                         server_redraw_client(c);                          server_redraw_client(c);
                 }                  }
         }          }

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24