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

Diff for /src/usr.bin/tmux/cmd-split-window.c between version 1.111 and 1.112

version 1.111, 2021/10/07 07:52:13 version 1.112, 2022/03/08 22:14:25
Line 61 
Line 61 
         struct client           *tc = cmdq_get_target_client(item);          struct client           *tc = cmdq_get_target_client(item);
         struct session          *s = target->s;          struct session          *s = target->s;
         struct winlink          *wl = target->wl;          struct winlink          *wl = target->wl;
           struct window           *w = wl->window;
         struct window_pane      *wp = target->wp, *new_wp;          struct window_pane      *wp = target->wp, *new_wp;
         enum layout_type         type;          enum layout_type         type;
         struct layout_cell      *lc;          struct layout_cell      *lc;
Line 87 
Line 88 
                                 cmdq_error(item, "percentage %s", errstr);                                  cmdq_error(item, "percentage %s", errstr);
                                 return (CMD_RETURN_ERROR);                                  return (CMD_RETURN_ERROR);
                         }                          }
                         if (type == LAYOUT_TOPBOTTOM)                          if (args_has(args, 'f')) {
                                 size = (wp->sy * percentage) / 100;                                  if (type == LAYOUT_TOPBOTTOM)
                         else                                          size = (w->sy * percentage) / 100;
                                 size = (wp->sx * percentage) / 100;                                  else
                                           size = (w->sx * percentage) / 100;
                           } else {
                                   if (type == LAYOUT_TOPBOTTOM)
                                           size = (wp->sy * percentage) / 100;
                                   else
                                           size = (wp->sx * percentage) / 100;
                           }
                 } else {                  } else {
                         size = args_strtonum(args, 'l', 0, INT_MAX, &cause);                          size = args_strtonum(args, 'l', 0, INT_MAX, &cause);
                         if (cause != NULL) {                          if (cause != NULL) {
Line 106 
Line 114 
                         free(cause);                          free(cause);
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
                 if (type == LAYOUT_TOPBOTTOM)                  if (args_has(args, 'f')) {
                         size = (wp->sy * percentage) / 100;                          if (type == LAYOUT_TOPBOTTOM)
                 else                                  size = (w->sy * percentage) / 100;
                         size = (wp->sx * percentage) / 100;                          else
                                   size = (w->sx * percentage) / 100;
                   } else {
                           if (type == LAYOUT_TOPBOTTOM)
                                   size = (wp->sy * percentage) / 100;
                           else
                                   size = (wp->sx * percentage) / 100;
                   }
         } else          } else
                 size = -1;                  size = -1;
   

Legend:
Removed from v.1.111  
changed lines
  Added in v.1.112