mirror of
https://github.com/tmux/tmux.git
synced 2026-07-03 10:12:31 +00:00
Handle different borders in move-pane, from Dane Jensen.
This commit is contained in:
@@ -203,24 +203,29 @@ cmd_join_pane_move(struct cmdq_item *item, struct args *args,
|
||||
char *cause = NULL, flag;
|
||||
int xoff = lc->xoff, yoff = lc->yoff, adjust;
|
||||
u_int i;
|
||||
enum pane_lines lines = window_pane_get_pane_lines(wp);
|
||||
|
||||
if (args_has(args, 'X')) {
|
||||
xoff = args_percentage_and_expand(args, 'X', -(int)lc->sx,
|
||||
xoff = args_percentage_and_expand(args, 'X', -(int)w->sx,
|
||||
w->sx, w->sx, item, &cause);
|
||||
if (cause != NULL) {
|
||||
cmdq_error(item, "position %s", cause);
|
||||
free(cause);
|
||||
return (CMD_RETURN_ERROR);
|
||||
}
|
||||
if (lines != PANE_LINES_NONE)
|
||||
xoff += 1;
|
||||
}
|
||||
if (args_has(args, 'Y')) {
|
||||
yoff = args_percentage_and_expand(args, 'Y', -(int)lc->sy,
|
||||
yoff = args_percentage_and_expand(args, 'Y', -(int)w->sy,
|
||||
w->sy, w->sy, item, &cause);
|
||||
if (cause != NULL) {
|
||||
cmdq_error(item, "position %s", cause);
|
||||
free(cause);
|
||||
return (CMD_RETURN_ERROR);
|
||||
}
|
||||
if (lines != PANE_LINES_NONE)
|
||||
yoff += 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < nitems(flags); i++) {
|
||||
|
||||
Reference in New Issue
Block a user