[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.83 and 1.84

version 1.83, 2015/09/14 13:22:02 version 1.84, 2015/10/27 15:58:42
Line 126 
Line 126 
   
         /* Work out the tree from the table. */          /* Work out the tree from the table. */
         if (table == server_options_table)          if (table == server_options_table)
                 oo = &global_options;                  oo = global_options;
         else if (table == window_options_table) {          else if (table == window_options_table) {
                 if (args_has(self->args, 'g'))                  if (args_has(self->args, 'g'))
                         oo = &global_w_options;                          oo = global_w_options;
                 else {                  else {
                         wl = cmd_find_window(cmdq, args_get(args, 't'), NULL);                          wl = cmd_find_window(cmdq, args_get(args, 't'), NULL);
                         if (wl == NULL) {                          if (wl == NULL) {
Line 139 
Line 139 
                                     'g')) ? " need target window or -g" : "");                                      'g')) ? " need target window or -g" : "");
                                 return (CMD_RETURN_ERROR);                                  return (CMD_RETURN_ERROR);
                         }                          }
                         oo = &wl->window->options;                          oo = wl->window->options;
                 }                  }
         } else if (table == session_options_table) {          } else if (table == session_options_table) {
                 if (args_has(self->args, 'g'))                  if (args_has(self->args, 'g'))
                         oo = &global_s_options;                          oo = global_s_options;
                 else {                  else {
                         s = cmd_find_session(cmdq, args_get(args, 't'), 0);                          s = cmd_find_session(cmdq, args_get(args, 't'), 0);
                         if (s == NULL) {                          if (s == NULL) {
Line 153 
Line 153 
                                     'g')) ? " need target session or -g" : "");                                      'g')) ? " need target session or -g" : "");
                                 return (CMD_RETURN_ERROR);                                  return (CMD_RETURN_ERROR);
                         }                          }
                         oo = &s->options;                          oo = s->options;
                 }                  }
         } else {          } else {
                 cmdq_error(cmdq, "unknown table");                  cmdq_error(cmdq, "unknown table");
Line 179 
Line 179 
         /* Start or stop timers if necessary. */          /* Start or stop timers if necessary. */
         if (strcmp(oe->name, "automatic-rename") == 0) {          if (strcmp(oe->name, "automatic-rename") == 0) {
                 RB_FOREACH(w, windows, &windows) {                  RB_FOREACH(w, windows, &windows) {
                         if (options_get_number(&w->options, "automatic-rename"))                          if (options_get_number(w->options, "automatic-rename"))
                                 w->active->flags |= PANE_CHANGED;                                  w->active->flags |= PANE_CHANGED;
                 }                  }
         }          }
Line 210 
Line 210 
         struct options  *oo;          struct options  *oo;
   
         if (args_has(args, 's'))          if (args_has(args, 's'))
                 oo = &global_options;                  oo = global_options;
         else if (args_has(self->args, 'w') ||          else if (args_has(self->args, 'w') ||
             self->entry == &cmd_set_window_option_entry) {              self->entry == &cmd_set_window_option_entry) {
                 if (args_has(self->args, 'g'))                  if (args_has(self->args, 'g'))
                         oo = &global_w_options;                          oo = global_w_options;
                 else {                  else {
                         wl = cmd_find_window(cmdq, args_get(args, 't'), NULL);                          wl = cmd_find_window(cmdq, args_get(args, 't'), NULL);
                         if (wl == NULL)                          if (wl == NULL)
                                 return (CMD_RETURN_ERROR);                                  return (CMD_RETURN_ERROR);
                         oo = &wl->window->options;                          oo = wl->window->options;
                 }                  }
         } else {          } else {
                 if (args_has(self->args, 'g'))                  if (args_has(self->args, 'g'))
                         oo = &global_s_options;                          oo = global_s_options;
                 else {                  else {
                         s = cmd_find_session(cmdq, args_get(args, 't'), 0);                          s = cmd_find_session(cmdq, args_get(args, 't'), 0);
                         if (s == NULL)                          if (s == NULL)
                                 return (CMD_RETURN_ERROR);                                  return (CMD_RETURN_ERROR);
                         oo = &s->options;                          oo = s->options;
                 }                  }
         }          }
   
Line 276 
Line 276 
                 return (-1);                  return (-1);
         }          }
   
         if (args_has(args, 'g') || oo == &global_options) {          if (args_has(args, 'g') || oo == global_options) {
                 switch (oe->type) {                  switch (oe->type) {
                 case OPTIONS_TABLE_STRING:                  case OPTIONS_TABLE_STRING:
                         options_set_string(oo, oe->name, "%s", oe->default_str);                          options_set_string(oo, oe->name, "%s", oe->default_str);

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.84