mirror of
https://github.com/tmux/tmux.git
synced 2026-10-12 13:44:44 +00:00
Fix empty argument to splitw/newp and add -k to copy-mode.
This commit is contained in:
@@ -30,8 +30,8 @@ const struct cmd_entry cmd_copy_mode_entry = {
|
|||||||
.name = "copy-mode",
|
.name = "copy-mode",
|
||||||
.alias = NULL,
|
.alias = NULL,
|
||||||
|
|
||||||
.args = { "deHMqSs:t:u", 0, 0, NULL },
|
.args = { "dekHMqSs:t:u", 0, 0, NULL },
|
||||||
.usage = "[-deHMqSu] [-s src-pane] " CMD_TARGET_PANE_USAGE,
|
.usage = "[-dekHMqSu] [-s src-pane] " CMD_TARGET_PANE_USAGE,
|
||||||
|
|
||||||
.source = { 's', CMD_FIND_PANE, 0 },
|
.source = { 's', CMD_FIND_PANE, 0 },
|
||||||
.target = { 't', CMD_FIND_PANE, 0 },
|
.target = { 't', CMD_FIND_PANE, 0 },
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
sc.cwd = args_get(args, 'c');
|
sc.cwd = args_get(args, 'c');
|
||||||
|
|
||||||
sc.flags = 0;
|
sc.flags = 0;
|
||||||
if (args_has(args, 'E'))
|
if (args_has(args, 'E') || (count == 1 && *args_string(args, 0) == '\0'))
|
||||||
sc.flags |= SPAWN_EMPTY;
|
sc.flags |= SPAWN_EMPTY;
|
||||||
if (args_has(args, 'd'))
|
if (args_has(args, 'd'))
|
||||||
sc.flags |= SPAWN_DETACHED;
|
sc.flags |= SPAWN_DETACHED;
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
flags |= SPAWN_FULLSIZE;
|
flags |= SPAWN_FULLSIZE;
|
||||||
|
|
||||||
input = args_has(args, 'I');
|
input = args_has(args, 'I');
|
||||||
if (input)
|
if (input || (count == 1 && *args_string(args, 0) == '\0'))
|
||||||
empty = 1;
|
empty = 1;
|
||||||
else
|
else
|
||||||
empty = args_has(args, 'E');
|
empty = args_has(args, 'E');
|
||||||
|
|||||||
5
tmux.1
5
tmux.1
@@ -2585,7 +2585,7 @@ The synopsis for the
|
|||||||
command is:
|
command is:
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Xo Ic copy\-mode
|
.It Xo Ic copy\-mode
|
||||||
.Op Fl deHMqSu
|
.Op Fl dekHMqSu
|
||||||
.Op Fl s Ar src\-pane
|
.Op Fl s Ar src\-pane
|
||||||
.Op Fl t Ar target\-pane
|
.Op Fl t Ar target\-pane
|
||||||
.Xc
|
.Xc
|
||||||
@@ -2625,6 +2625,9 @@ example with:
|
|||||||
bind PageUp copy\-mode \-eu
|
bind PageUp copy\-mode \-eu
|
||||||
bind PageDown copy\-mode \-ed
|
bind PageDown copy\-mode \-ed
|
||||||
.Ed
|
.Ed
|
||||||
|
.Pp
|
||||||
|
.Fl k
|
||||||
|
kills the pane when the mode is exited.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
A number of preset arrangements of panes are available, these are called
|
A number of preset arrangements of panes are available, these are called
|
||||||
|
|||||||
Reference in New Issue
Block a user