[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.137 and 1.138

version 1.137, 2020/06/16 08:18:34 version 1.138, 2020/12/15 08:31:50
Line 33 
Line 33 
         .name = "set-option",          .name = "set-option",
         .alias = "set",          .alias = "set",
   
         .args = { "aFgopqst:uw", 1, 2 },          .args = { "aFgopqst:uUw", 1, 2 },
         .usage = "[-aFgopqsuw] " CMD_TARGET_PANE_USAGE " option [value]",          .usage = "[-aFgopqsuUw] " CMD_TARGET_PANE_USAGE " option [value]",
   
         .target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL },          .target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL },
   
Line 74 
Line 74 
         struct args                     *args = cmd_get_args(self);          struct args                     *args = cmd_get_args(self);
         int                              append = args_has(args, 'a');          int                              append = args_has(args, 'a');
         struct cmd_find_state           *target = cmdq_get_target(item);          struct cmd_find_state           *target = cmdq_get_target(item);
           struct window_pane              *loop;
         struct options                  *oo;          struct options                  *oo;
         struct options_entry            *parent, *o;          struct options_entry            *parent, *o, *po;
         char                            *name, *argument, *value = NULL, *cause;          char                            *name, *argument, *value = NULL, *cause;
         int                              window, idx, already, error, ambiguous;          int                              window, idx, already, error, ambiguous;
         int                              scope;          int                              scope;
Line 148 
Line 149 
         }          }
   
         /* Change the option. */          /* Change the option. */
         if (args_has(args, 'u')) {          if (args_has(args, 'U') && scope == OPTIONS_TABLE_WINDOW) {
                   TAILQ_FOREACH(loop, &target->w->panes, entry) {
                           po = options_get_only(loop->options, name);
                           if (po == NULL)
                                   continue;
                           if (options_remove_or_default(po, idx, &cause) != 0) {
                                   cmdq_error(item, "%s", cause);
                                   free(cause);
                                   goto fail;
                           }
                   }
           }
           if (args_has(args, 'u') || args_has(args, 'U')) {
                 if (o == NULL)                  if (o == NULL)
                         goto out;                          goto out;
                 if (options_remove_or_default(o, idx, &cause) != 0) {                  if (options_remove_or_default(o, idx, &cause) != 0) {

Legend:
Removed from v.1.137  
changed lines
  Added in v.1.138