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

Diff for /src/usr.bin/tmux/cmd-swap-pane.c between version 1.5 and 1.6

version 1.5, 2009/07/19 13:21:40 version 1.6, 2009/07/20 07:13:31
Line 158 
Line 158 
         struct window                   *w;          struct window                   *w;
         struct window_pane              *tmp_wp, *src_wp, *dst_wp;          struct window_pane              *tmp_wp, *src_wp, *dst_wp;
         struct layout_cell              *lc;          struct layout_cell              *lc;
         u_int                            xx, yy;          u_int                            sx, sy, xoff, yoff;
   
         if (data == NULL)          if (data == NULL)
                 return (0);                  return (0);
Line 209 
Line 209 
                 TAILQ_INSERT_AFTER(&w->panes, tmp_wp, src_wp, entry);                  TAILQ_INSERT_AFTER(&w->panes, tmp_wp, src_wp, entry);
   
         lc = src_wp->layout_cell;          lc = src_wp->layout_cell;
         xx = src_wp->xoff;  
         yy = src_wp->yoff;  
         src_wp->layout_cell = dst_wp->layout_cell;          src_wp->layout_cell = dst_wp->layout_cell;
         if (src_wp->layout_cell != NULL)          if (src_wp->layout_cell != NULL)
                 src_wp->layout_cell->wp = src_wp;                  src_wp->layout_cell->wp = src_wp;
Line 218 
Line 216 
         if (dst_wp->layout_cell != NULL)          if (dst_wp->layout_cell != NULL)
                 dst_wp->layout_cell->wp = dst_wp;                  dst_wp->layout_cell->wp = dst_wp;
   
         xx = src_wp->sx;          sx = src_wp->sx; sy = src_wp->sy;
         yy = src_wp->sy;          xoff = src_wp->xoff; yoff = src_wp->yoff;
           src_wp->xoff = dst_wp->xoff; src_wp->yoff = dst_wp->yoff;
         window_pane_resize(src_wp, dst_wp->sx, dst_wp->sy);          window_pane_resize(src_wp, dst_wp->sx, dst_wp->sy);
         window_pane_resize(dst_wp, xx, yy);          dst_wp->xoff = xoff; dst_wp->yoff = yoff;
           window_pane_resize(dst_wp, sx, sy);
   
         if (!data->flag_detached) {          if (!data->flag_detached) {
                 tmp_wp = dst_wp;                  tmp_wp = dst_wp;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6