[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.93 and 1.94

version 1.93, 2016/01/19 15:59:12 version 1.94, 2016/03/03 14:15:22
Line 100 
Line 100 
         struct client                           *c;          struct client                           *c;
         const struct options_table_entry        *oe;          const struct options_table_entry        *oe;
         struct options                          *oo;          struct options                          *oo;
         const char                              *optstr, *valstr;          const char                              *optstr, *valstr, *target;
   
         /* Get the option name and value. */          /* Get the option name and value. */
         optstr = args->argv[0];          optstr = args->argv[0];
Line 140 
Line 140 
         else if (oe->scope == OPTIONS_TABLE_WINDOW) {          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 if (wl == NULL) {
                         if (wl == NULL) {                          target = args_get(args, 't');
                                 cmdq_error(cmdq,                          if (target != NULL) {
                                     "couldn't set '%s'%s", optstr,                                  cmdq_error(cmdq, "no such window: %s",
                                     (!args_has(args, 't') && !args_has(args,                                      target);
                                     'g')) ? " need target window or -g" : "");                          } else
                                 return (CMD_RETURN_ERROR);                                  cmdq_error(cmdq, "no current window");
                         }                          return (CMD_RETURN_ERROR);
                   } else
                         oo = wl->window->options;                          oo = wl->window->options;
                 }  
         } else if (oe->scope == OPTIONS_TABLE_SESSION) {          } 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 if (s == NULL) {
                         if (s == NULL) {                          target = args_get(args, 't');
                                 cmdq_error(cmdq,                          if (target != NULL) {
                                     "couldn't set '%s'%s", optstr,                                  cmdq_error(cmdq, "no such session: %s",
                                     (!args_has(args, 't') && !args_has(args,                                      target);
                                     'g')) ? " need target session or -g" : "");                          } else
                                 return (CMD_RETURN_ERROR);                                  cmdq_error(cmdq, "no current session");
                         }                          return (CMD_RETURN_ERROR);
                   } else
                         oo = s->options;                          oo = s->options;
                 }  
         } else {          } else {
                 cmdq_error(cmdq, "unknown table");                  cmdq_error(cmdq, "unknown table");
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);

Legend:
Removed from v.1.93  
changed lines
  Added in v.1.94