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

Diff for /src/usr.bin/tmux/cmd-show-options.c between version 1.30 and 1.31

version 1.30, 2016/01/19 15:59:12 version 1.31, 2016/03/03 14:15:22
Line 63 
Line 63 
 enum cmd_retval  enum cmd_retval
 cmd_show_options_exec(struct cmd *self, struct cmd_q *cmdq)  cmd_show_options_exec(struct cmd *self, struct cmd_q *cmdq)
 {  {
         struct args                             *args = self->args;          struct args                     *args = self->args;
         struct session                          *s = cmdq->state.tflag.s;          struct session                  *s = cmdq->state.tflag.s;
         struct winlink                          *wl = cmdq->state.tflag.wl;          struct winlink                  *wl = cmdq->state.tflag.wl;
         struct options                          *oo;          struct options                  *oo;
         enum options_table_scope                 scope;          enum options_table_scope         scope;
         int                                      quiet;          int                              quiet;
           const char                      *target;
   
         if (args_has(self->args, 's')) {          if (args_has(self->args, 's')) {
                 oo = global_options;                  oo = global_options;
Line 78 
Line 79 
                 scope = OPTIONS_TABLE_WINDOW;                  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) {
                           target = args_get(args, 't');
                           if (target != NULL) {
                                   cmdq_error(cmdq, "no such window: %s", target);
                           } else
                                   cmdq_error(cmdq, "no current window");
                           return (CMD_RETURN_ERROR);
                   } else
                         oo = wl->window->options;                          oo = wl->window->options;
         } else {          } else {
                 scope = OPTIONS_TABLE_SESSION;                  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) {
                           target = args_get(args, 't');
                           if (target != NULL) {
                                   cmdq_error(cmdq, "no such session: %s", target);
                           } else
                                   cmdq_error(cmdq, "no current session");
                           return (CMD_RETURN_ERROR);
                   } else
                         oo = s->options;                          oo = s->options;
         }          }
   

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31