version 1.33, 2017/08/30 10:33:57 |
version 1.34, 2019/04/17 14:37:48 |
|
|
int size, percentage, dst_idx; |
int size, percentage, dst_idx; |
enum layout_type type; |
enum layout_type type; |
struct layout_cell *lc; |
struct layout_cell *lc; |
int not_same_window; |
int not_same_window, flags; |
|
|
if (self->entry == &cmd_join_pane_entry) |
if (self->entry == &cmd_join_pane_entry) |
not_same_window = 1; |
not_same_window = 1; |
|
|
else |
else |
size = (dst_wp->sx * percentage) / 100; |
size = (dst_wp->sx * percentage) / 100; |
} |
} |
lc = layout_split_pane(dst_wp, type, size, args_has(args, 'b'), 0); |
if (args_has(args, 'b')) |
|
flags = SPAWN_BEFORE; |
|
else |
|
flags = 0; |
|
lc = layout_split_pane(dst_wp, type, size, flags); |
if (lc == NULL) { |
if (lc == NULL) { |
cmdq_error(item, "create pane failed: pane too small"); |
cmdq_error(item, "create pane failed: pane too small"); |
return (CMD_RETURN_ERROR); |
return (CMD_RETURN_ERROR); |
|
|
server_redraw_window(dst_w); |
server_redraw_window(dst_w); |
|
|
if (!args_has(args, 'd')) { |
if (!args_has(args, 'd')) { |
window_set_active_pane(dst_w, src_wp); |
window_set_active_pane(dst_w, src_wp, 1); |
session_select(dst_s, dst_idx); |
session_select(dst_s, dst_idx); |
cmd_find_from_session(current, dst_s, 0); |
cmd_find_from_session(current, dst_s, 0); |
server_redraw_session(dst_s); |
server_redraw_session(dst_s); |