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

Diff for /src/usr.bin/tmux/cmd-break-pane.c between version 1.26 and 1.27

version 1.26, 2015/02/05 10:29:43 version 1.27, 2015/06/17 19:56:08
Line 32 
Line 32 
   
 const struct cmd_entry cmd_break_pane_entry = {  const struct cmd_entry cmd_break_pane_entry = {
         "break-pane", "breakp",          "break-pane", "breakp",
         "dPF:t:", 0, 0,          "dPF:s:t:", 0, 0,
         "[-dP] [-F format] " CMD_TARGET_PANE_USAGE,          "[-dP] [-F format] " CMD_SRCDST_PANE_USAGE,
         0,          0,
         cmd_break_pane_exec          cmd_break_pane_exec
 };  };
Line 48 
Line 48 
         struct window           *w;          struct window           *w;
         char                    *name;          char                    *name;
         char                    *cause;          char                    *cause;
         int                      base_idx;          int                      idx;
         struct format_tree      *ft;          struct format_tree      *ft;
         const char              *template;          const char              *template;
         char                    *cp;          char                    *cp;
   
         if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp)) == NULL)          if ((wl = cmd_find_pane(cmdq, args_get(args, 's'), &s, &wp)) == NULL)
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
           if ((idx = cmd_find_index(cmdq, args_get(args, 't'), &s)) == -2)
                   return (CMD_RETURN_ERROR);
           if (idx != -1 && winlink_find_by_index(&s->windows, idx) != NULL) {
                   cmdq_error(cmdq, "index %d already in use", idx);
                   return (CMD_RETURN_ERROR);
           }
   
         if (window_count_panes(wl->window) == 1) {          if (window_count_panes(wl->window) == 1) {
                 cmdq_error(cmdq, "can't break with only one pane");                  cmdq_error(cmdq, "can't break with only one pane");
Line 76 
Line 82 
         free(name);          free(name);
         layout_init(w, wp);          layout_init(w, wp);
   
         base_idx = options_get_number(&s->options, "base-index");          if (idx == -1)
         wl = session_attach(s, w, -1 - base_idx, &cause); /* can't fail */                  idx = -1 - options_get_number(&s->options, "base-index");
           wl = session_attach(s, w, idx, &cause); /* can't fail */
         if (!args_has(self->args, 'd'))          if (!args_has(self->args, 'd'))
                 session_select(s, wl->idx);                  session_select(s, wl->idx);
   

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27