diff --git a/cmd-new-pane.c b/cmd-new-pane.c index 1a7911e8..82a600e2 100644 --- a/cmd-new-pane.c +++ b/cmd-new-pane.c @@ -35,9 +35,10 @@ const struct cmd_entry cmd_new_pane_entry = { .name = "new-pane", .alias = "newp", - .args = { "bc:de:fF:h:Iklm:p:Ps:S:t:w:x:y:Z", 0, -1, NULL }, + .args = { "bc:de:fF:h:Iklm:p:PR:s:S:t:w:x:y:Z", 0, -1, NULL }, .usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] " - "[-F format] [-l size] [-m message] [-s style] [-S border-style] " + "[-F format] [-l size] [-m message] " + "[-R inactive-border-style] [-s style] [-S active-border-style] " CMD_TARGET_PANE_USAGE " [shell-command [argument ...]]", .target = { 't', CMD_FIND_PANE, 0 }, @@ -217,13 +218,19 @@ cmd_new_pane_exec(struct cmd *self, struct cmdq_item *item) } style = args_get(args, 'S'); if (style != NULL) { - if (options_set_string(new_wp->options, "pane-border-style", 0, - "%s", style) == NULL) { - cmdq_error(item, "bad border style: %s", style); + if (options_set_string(new_wp->options, + "pane-active-border-style", 0, "%s", style) == NULL) { + cmdq_error(item, "bad active border style: %s", style); + return (CMD_RETURN_ERROR); + } + } + style = args_get(args, 'R'); + if (style != NULL) { + if (options_set_string(new_wp->options, "pane-border-style", 0, + "%s", style) == NULL) { + cmdq_error(item, "bad inactive border style: %s", style); return (CMD_RETURN_ERROR); } - options_set_string(new_wp->options, "pane-active-border-style", - 0, "%s", style); } if (args_has(args, 'k') || args_has(args, 'm')) { options_set_number(new_wp->options, "remain-on-exit", 3); diff --git a/tmux.1 b/tmux.1 index 0b52fd93..10daa5b6 100644 --- a/tmux.1 +++ b/tmux.1 @@ -3278,8 +3278,9 @@ but a different format may be specified with .Op Fl l Ar size .Op Fl m Ar message .Op Fl p Ar percentage +.Op Fl R Ar inactive-border-style .Op Fl s Ar style -.Op Fl S Ar border-style +.Op Fl S Ar active-border-style .Op Fl t Ar target-pane .Op Fl w Ar width .Op Fl x Ar x-position @@ -3337,9 +3338,11 @@ is not specified or empty) will create an empty pane and forward any output from stdin to it. .Pp .Fl s -sets the style for the pane and +sets the style for the pane content. .Fl S -sets the style for the pane border (see +sets the border style when the pane is active and +.Fl R +sets the border style when the pane is inactive (see .Sx STYLES ) . .Pp All other options have the same meaning as for the