diff --git a/cmd-copy-mode.c b/cmd-copy-mode.c index fce6d3fbd..cfa60f59f 100644 --- a/cmd-copy-mode.c +++ b/cmd-copy-mode.c @@ -30,8 +30,8 @@ const struct cmd_entry cmd_copy_mode_entry = { .name = "copy-mode", .alias = NULL, - .args = { "deHMqSs:t:u", 0, 0, NULL }, - .usage = "[-deHMqSu] [-s src-pane] " CMD_TARGET_PANE_USAGE, + .args = { "dekHMqSs:t:u", 0, 0, NULL }, + .usage = "[-dekHMqSu] [-s src-pane] " CMD_TARGET_PANE_USAGE, .source = { 's', CMD_FIND_PANE, 0 }, .target = { 't', CMD_FIND_PANE, 0 }, diff --git a/cmd-new-window.c b/cmd-new-window.c index 6e6d70ccc..a54aaaa20 100644 --- a/cmd-new-window.c +++ b/cmd-new-window.c @@ -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; diff --git a/cmd-split-window.c b/cmd-split-window.c index 276138c19..09cfbfa86 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -105,7 +105,7 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) flags |= SPAWN_FULLSIZE; input = args_has(args, 'I'); - if (input) + if (input || (count == 1 && *args_string(args, 0) == '\0')) empty = 1; else empty = args_has(args, 'E'); diff --git a/tmux.1 b/tmux.1 index fcf702fee..593d4de06 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2585,7 +2585,7 @@ The synopsis for the command is: .Bl -tag -width Ds .It Xo Ic copy\-mode -.Op Fl deHMqSu +.Op Fl dekHMqSu .Op Fl s Ar src\-pane .Op Fl t Ar target\-pane .Xc @@ -2625,6 +2625,9 @@ example with: bind PageUp copy\-mode \-eu bind PageDown copy\-mode \-ed .Ed +.Pp +.Fl k +kills the pane when the mode is exited. .El .Pp A number of preset arrangements of panes are available, these are called