[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.86 and 1.87

version 1.86, 2015/11/18 14:27:44 version 1.87, 2015/11/20 12:01:19
Line 84 
Line 84 
 cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq)  cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq)
 {  {
         struct args                             *args = self->args;          struct args                             *args = self->args;
         const struct options_table_entry        *table, *oe;          const struct options_table_entry        *oe;
         struct session                          *s;          struct session                          *s;
         struct winlink                          *wl;          struct winlink                          *wl;
         struct client                           *c;          struct client                           *c;
Line 108 
Line 108 
                 return (cmd_set_option_user(self, cmdq, optstr, valstr));                  return (cmd_set_option_user(self, cmdq, optstr, valstr));
   
         /* Find the option entry, try each table. */          /* Find the option entry, try each table. */
         table = oe = NULL;          oe = NULL;
         if (options_table_find(optstr, &table, &oe) != 0) {          if (options_table_find(optstr, &oe) != 0) {
                 if (!args_has(args, 'q')) {                  if (!args_has(args, 'q')) {
                         cmdq_error(cmdq, "ambiguous option: %s", optstr);                          cmdq_error(cmdq, "ambiguous option: %s", optstr);
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
Line 124 
Line 124 
                 return (CMD_RETURN_NORMAL);                  return (CMD_RETURN_NORMAL);
         }          }
   
         /* Work out the tree from the table. */          /* Work out the tree from the scope of the option. */
         if (table == server_options_table)          if (oe->scope == OPTIONS_TABLE_SERVER)
                 oo = global_options;                  oo = global_options;
         else if (table == window_options_table) {          else if (oe->scope == OPTIONS_TABLE_WINDOW) {
                 if (args_has(self->args, 'g'))                  if (args_has(self->args, 'g'))
                         oo = global_w_options;                          oo = global_w_options;
                 else {                  else {
Line 141 
Line 141 
                         }                          }
                         oo = wl->window->options;                          oo = wl->window->options;
                 }                  }
         } else if (table == session_options_table) {          } else if (oe->scope == OPTIONS_TABLE_SESSION) {
                 if (args_has(self->args, 'g'))                  if (args_has(self->args, 'g'))
                         oo = global_s_options;                          oo = global_s_options;
                 else {                  else {

Legend:
Removed from v.1.86  
changed lines
  Added in v.1.87