Fix empty argument to splitw/newp and add -k to copy-mode.

This commit is contained in:
nicm
2026-07-08 08:07:42 +00:00
parent 28c2005a2a
commit 25060c3fa5
4 changed files with 8 additions and 5 deletions

View File

@@ -141,7 +141,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
sc.cwd = args_get(args, 'c');
sc.flags = 0;
if (args_has(args, 'E'))
if (args_has(args, 'E') || (count == 1 && *args_string(args, 0) == '\0'))
sc.flags |= SPAWN_EMPTY;
if (args_has(args, 'd'))
sc.flags |= SPAWN_DETACHED;