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

Diff for /src/usr.bin/tmux/cmd-select-layout.c between version 1.16 and 1.17

version 1.16, 2012/07/11 07:10:15 version 1.17, 2013/01/17 00:11:22
Line 29 
Line 29 
   
 const struct cmd_entry cmd_select_layout_entry = {  const struct cmd_entry cmd_select_layout_entry = {
         "select-layout", "selectl",          "select-layout", "selectl",
         "nprut:", 0, 1,          "npt:", 0, 1,
         "[-npUu] " CMD_TARGET_WINDOW_USAGE " [layout-name]",          "[-np] " CMD_TARGET_WINDOW_USAGE " [layout-name]",
         0,          0,
         cmd_select_layout_key_binding,          cmd_select_layout_key_binding,
         NULL,          NULL,
Line 76 
Line 76 
         case '5' | KEYC_ESCAPE:          case '5' | KEYC_ESCAPE:
                 self->args = args_create(1, "tiled");                  self->args = args_create(1, "tiled");
                 break;                  break;
         case 'u':  
                 self->args = args_create(0);  
                 args_set(self->args, 'u', NULL);  
                 break;  
         case 'U':  
                 self->args = args_create(0);  
                 args_set(self->args, 'U', NULL);  
                 break;  
         default:          default:
                 self->args = args_create(0);                  self->args = args_create(0);
                 break;                  break;
Line 110 
Line 102 
         if (args_has(self->args, 'p'))          if (args_has(self->args, 'p'))
                 previous = 1;                  previous = 1;
   
         layout_list_add(w);  
         if (args_has(self->args, 'U')) {  
                 if ((layoutname = layout_list_redo(w)) == NULL) {  
                         ctx->info(ctx, "no more layout history");  
                         return (CMD_RETURN_ERROR);  
                 }  
                 goto set_layout;  
         } else if (args_has(self->args, 'u')) {  
                 if ((layoutname = layout_list_undo(w)) == NULL) {  
                         ctx->info(ctx, "no more layout history");  
                         return (CMD_RETURN_ERROR);  
                 }  
                 goto set_layout;  
         }  
   
         if (next || previous) {          if (next || previous) {
                 if (next)                  if (next)
                         layout = layout_set_next(wl->window);                          layout = layout_set_next(wl->window);
Line 146 
Line 123 
                 return (CMD_RETURN_NORMAL);                  return (CMD_RETURN_NORMAL);
         }          }
   
         if (args->argc == 0)          if (args->argc != 0) {
                 return (CMD_RETURN_NORMAL);                  layoutname = args->argv[0];
         layoutname = args->argv[0];                  if (layout_parse(wl->window, layoutname) == -1) {
                           ctx->error(ctx, "can't set layout: %s", layoutname);
 set_layout:                          return (CMD_RETURN_ERROR);
         if (layout_parse(wl->window, layoutname) == -1) {                  }
                 ctx->error(ctx, "can't set layout: %s", layoutname);                  server_redraw_window(wl->window);
                 return (CMD_RETURN_ERROR);                  ctx->info(ctx, "arranging in: %s", layoutname);
         }          }
         server_redraw_window(wl->window);  
         ctx->info(ctx, "arranging in: %s", layoutname);  
         return (CMD_RETURN_NORMAL);          return (CMD_RETURN_NORMAL);
 }  }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17