Option flag adjustment for eventual consistency.

This commit is contained in:
Dane Jensen
2026-04-16 11:38:33 -07:00
parent 914ffc8887
commit a7ad0c4434
2 changed files with 38 additions and 38 deletions

View File

@@ -38,12 +38,12 @@ const struct cmd_entry cmd_new_pane_entry = {
.name = "new-pane", .name = "new-pane",
.alias = "newp", .alias = "newp",
.args = { "bc:de:fF:hH:Ikl:m:M:p:PR:s:S:t:w:x:y:vZ", 0, -1, NULL }, .args = { "bc:de:fF:hIkl:m:M:p:PR:s:S:t:x:X:y:Y:vZ", 0, -1, NULL },
.usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] " .usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] "
"[-F format] [-H height] [-l size] [-m message] " "[-F format] [-l size] [-m message] [-M mode] "
"[-M mode] [-R inactive-border-style] [-s style] " "[-R inactive-border-style] [-s style] "
"[-S active-border-style] [-w width] [-x x-position] " "[-S active-border-style] [-x width] [-X x-position]"
"[-y y-position]" CMD_TARGET_PANE_USAGE "[-y length] [-Y y-position]" CMD_TARGET_PANE_USAGE
"[shell-command [argument ...]]", "[shell-command [argument ...]]",
.target = { 't', CMD_FIND_PANE, 0 }, .target = { 't', CMD_FIND_PANE, 0 },
@@ -56,12 +56,12 @@ const struct cmd_entry cmd_split_window_entry = {
.name = "split-window", .name = "split-window",
.alias = "splitw", .alias = "splitw",
.args = { "bc:de:fF:hH:Ikl:m:M:p:PR:s:S:t:w:x:y:vZ", 0, -1, NULL }, .args = { "bc:de:fF:hIkl:m:M:p:PR:s:S:t:x:X:y:Y:vZ", 0, -1, NULL },
.usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] " .usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] "
"[-F format] [-H height] [-l size] [-m message] " "[-F format] [-l size] [-m message] [-M mode] "
"[-M mode] [-R inactive-border-style] [-s style] " "[-R inactive-border-style] [-s style] "
"[-S active-border-style] [-w width] [-x x-position] " "[-S active-border-style] [-x width] [-X x-position]"
"[-y y-position]" CMD_TARGET_PANE_USAGE "[-y length] [-Y y-position]" CMD_TARGET_PANE_USAGE
"[shell-command [argument ...]]", "[shell-command [argument ...]]",
.target = { 't', CMD_FIND_PANE, 0 }, .target = { 't', CMD_FIND_PANE, 0 },
@@ -100,8 +100,8 @@ cmd_split_window_get_floating_layout_cell(struct cmdq_item *item,
if (last_y > (int)w->sy) if (last_y > (int)w->sy)
y = 2; y = 2;
} }
if (args_has(args, 'w')) { if (args_has(args, 'x')) {
sx = args_percentage_and_expand(args, 'w', 0, USHRT_MAX, w->sx, sx = args_percentage_and_expand(args, 'x', 0, USHRT_MAX, w->sx,
item, &cause); item, &cause);
if (cause != NULL) { if (cause != NULL) {
cmdq_error(item, "size %s", cause); cmdq_error(item, "size %s", cause);
@@ -109,26 +109,26 @@ cmd_split_window_get_floating_layout_cell(struct cmdq_item *item,
return (NULL); return (NULL);
} }
} }
if (args_has(args, 'H')) {
sy = args_percentage_and_expand(args, 'H', 0, USHRT_MAX, w->sy,
item, &cause);
if (cause != NULL) {
cmdq_error(item, "size %s", cause);
free(cause);
return (NULL);
}
}
if (args_has(args, 'x')) {
x = args_percentage_and_expand(args, 'x', 0, USHRT_MAX, w->sx,
item, &cause);
if (cause != NULL) {
cmdq_error(item, "size %s", cause);
free(cause);
return (NULL);
}
}
if (args_has(args, 'y')) { if (args_has(args, 'y')) {
y = args_percentage_and_expand(args, 'y', 0, USHRT_MAX, w->sy, sy = args_percentage_and_expand(args, 'y', 0, USHRT_MAX, w->sy,
item, &cause);
if (cause != NULL) {
cmdq_error(item, "size %s", cause);
free(cause);
return (NULL);
}
}
if (args_has(args, 'X')) {
x = args_percentage_and_expand(args, 'X', 0, USHRT_MAX, w->sx,
item, &cause);
if (cause != NULL) {
cmdq_error(item, "size %s", cause);
free(cause);
return (NULL);
}
}
if (args_has(args, 'Y')) {
y = args_percentage_and_expand(args, 'Y', 0, USHRT_MAX, w->sy,
item, &cause); item, &cause);
if (cause != NULL) { if (cause != NULL) {
cmdq_error(item, "size %s", cause); cmdq_error(item, "size %s", cause);

14
tmux.1
View File

@@ -3327,7 +3327,6 @@ but a different format may be specified with
.Op Fl c Ar start-directory .Op Fl c Ar start-directory
.Op Fl e Ar environment .Op Fl e Ar environment
.Op Fl F Ar format .Op Fl F Ar format
.Op Fl H Ar height
.Op Fl l Ar size .Op Fl l Ar size
.Op Fl m Ar message .Op Fl m Ar message
.Op Fl M Ar mode .Op Fl M Ar mode
@@ -3336,9 +3335,10 @@ but a different format may be specified with
.Op Fl s Ar style .Op Fl s Ar style
.Op Fl S Ar active-border-style .Op Fl S Ar active-border-style
.Op Fl t Ar target-pane .Op Fl t Ar target-pane
.Op Fl w Ar width .Op Fl x Ar width
.Op Fl x Ar x-position .Op Fl X Ar x-position
.Op Fl y Ar y-position .Op Fl y Ar length
.Op Fl Y Ar y-position
.Op Ar shell-command Op Ar argument ... .Op Ar shell-command Op Ar argument ...
.Xc .Xc
.D1 Pq alias: Ic newp .D1 Pq alias: Ic newp
@@ -3406,11 +3406,11 @@ $ make 2>&1|tmux splitw \-dI &
.Pp .Pp
For floating panes, the following options are availible: For floating panes, the following options are availible:
The The
.Fl w ,
.Fl h ,
.Fl x , .Fl x ,
.Fl y ,
.Fl X ,
and and
.Fl y .Fl Y
options set the width, height, and position of the pane. options set the width, height, and position of the pane.
If not given, the pane is sized to half the window dimensions and offset from If not given, the pane is sized to half the window dimensions and offset from
the previous floating pane. the previous floating pane.