From ef8e9df02f666acac7934262587bc69cb83cc10b Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 7 Jun 2026 13:29:16 +0000 Subject: [PATCH] Tweak previous. --- cmd-split-window.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd-split-window.c b/cmd-split-window.c index 8cae6b6f..39770606 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -102,12 +102,17 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) flags |= SPAWN_FULLSIZE; input = args_has(args, 'I'); - empty = (count == 1 && *args_string(args, 0) == '\0'); - if (!empty && (input || args_has(args, 'E'))) { + if (input) + empty = 1; + else + empty = args_has(args, 'E'); + if (empty && + count != 0 && + (count != 1 || *args_string(args, 0) != '\0')) { cmdq_error(item, "command cannot be given for empty pane"); return (CMD_RETURN_ERROR); } - if (input || empty || args_has(args, 'E')) + if (empty) flags |= SPAWN_EMPTY; if (is_floating)