Add ability to float a tiled pane to break-pane, from Dane Jensen.

This commit is contained in:
nicm
2026-06-26 10:02:01 +00:00
parent dd2fef6673
commit d0bf3bf06d
5 changed files with 159 additions and 39 deletions

View File

@@ -101,9 +101,8 @@ cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item)
return (CMD_RETURN_ERROR);
}
if (window_pane_is_floating(wp)) {
layout_resize_floating_pane_to(wp, LAYOUT_LEFTRIGHT, x,
&cause);
if (cause != NULL) {
if (layout_resize_floating_pane_to(wp, LAYOUT_LEFTRIGHT,
x, &cause) != 0) {
cmdq_error(item, "size %s", cause);
free(cause);
return (CMD_RETURN_ERROR);
@@ -130,9 +129,8 @@ cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item)
break;
}
if (window_pane_is_floating(wp)) {
layout_resize_floating_pane_to(wp, LAYOUT_TOPBOTTOM, y,
&cause);
if (cause != NULL) {
if (layout_resize_floating_pane_to(wp, LAYOUT_TOPBOTTOM,
y, &cause) != 0) {
cmdq_error(item, "size %s", cause);
free(cause);
return (CMD_RETURN_ERROR);
@@ -168,9 +166,8 @@ cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item)
if (flag == 'L' || flag == 'U')
opposite = 1;
layout_resize_floating_pane(wp, type, adjust, opposite,
&cause);
if (cause != NULL) {
if (layout_resize_floating_pane(wp, type, adjust,
opposite, &cause) != 0) {
cmdq_error(item, "adjustment %s", cause);
free(cause);
return (CMD_RETURN_ERROR);