Return error if you try to split a floating pane.

This commit is contained in:
Michael Grant 2025-10-22 23:37:58 +01:00
parent 65fc09fac9
commit 38724f2e86

View File

@ -89,6 +89,11 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item)
struct args_value *av;
u_int count = args_count(args), curval = 0;
if (wp->layout_cell == NULL) {
cmdq_error(item, "can't split a floating pane");
return (CMD_RETURN_ERROR);
}
type = LAYOUT_TOPBOTTOM;
if (args_has(args, 'h'))
type = LAYOUT_LEFTRIGHT;