mirror of
https://github.com/tmux/tmux.git
synced 2026-06-21 17:55:21 +00:00
Merge branch 'obsd-master'
This commit is contained in:
@@ -38,8 +38,9 @@ const struct cmd_entry cmd_new_pane_entry = {
|
|||||||
.name = "new-pane",
|
.name = "new-pane",
|
||||||
.alias = "newp",
|
.alias = "newp",
|
||||||
|
|
||||||
.args = { "bc:de:EfF:hIkl:Lm:p:PR:s:S:t:T:vWx:X:y:Y:Z", 0, -1, NULL },
|
.args = { "bB:c:de:EfF:hIkl:Lm:p:PR:s:S:t:T:vWx:X:y:Y:Z", 0, -1, NULL },
|
||||||
.usage = "[-bdefhIklPvWZ] [-c start-directory] [-e environment] "
|
.usage = "[-bdefhIklPvWZ] [-B border-lines] "
|
||||||
|
"[-c start-directory] [-e environment] "
|
||||||
"[-F format] [-l size] [-m message] [-p percentage] "
|
"[-F format] [-l size] [-m message] [-p percentage] "
|
||||||
"[-s style] [-S active-border-style] "
|
"[-s style] [-S active-border-style] "
|
||||||
"[-R inactive-border-style] [-T title] [-x width] [-y height] "
|
"[-R inactive-border-style] [-T title] [-x width] [-y height] "
|
||||||
@@ -84,9 +85,11 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
struct layout_cell *lc = NULL;
|
struct layout_cell *lc = NULL;
|
||||||
struct cmd_find_state fs;
|
struct cmd_find_state fs;
|
||||||
int input, empty, is_floating, flags = 0;
|
int input, empty, is_floating, flags = 0;
|
||||||
const char *template, *style;
|
const char *template, *style, *value;
|
||||||
char *cause = NULL, *cp, *title;
|
char *cause = NULL, *cp, *title;
|
||||||
|
struct options_entry *oe;
|
||||||
struct args_value *av;
|
struct args_value *av;
|
||||||
|
enum pane_lines lines;
|
||||||
u_int count = args_count(args);
|
u_int count = args_count(args);
|
||||||
|
|
||||||
if (cmd_get_entry(self) == &cmd_new_pane_entry)
|
if (cmd_get_entry(self) == &cmd_new_pane_entry)
|
||||||
@@ -187,6 +190,19 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
value = args_get(args, 'B');
|
||||||
|
if (value != NULL) {
|
||||||
|
oe = options_get(new_wp->options, "pane-border-lines");
|
||||||
|
lines = options_find_choice(options_table_entry(oe), value,
|
||||||
|
&cause);
|
||||||
|
if (cause != NULL) {
|
||||||
|
cmdq_error(item, "pane-border-lines %s", cause);
|
||||||
|
free(cause);
|
||||||
|
return (CMD_RETURN_ERROR);
|
||||||
|
}
|
||||||
|
options_set_number(new_wp->options, "pane-border-lines",
|
||||||
|
lines);
|
||||||
|
}
|
||||||
if (args_has(args, 'k') || args_has(args, 'm')) {
|
if (args_has(args, 'k') || args_has(args, 'm')) {
|
||||||
options_set_number(new_wp->options, "remain-on-exit", 3);
|
options_set_number(new_wp->options, "remain-on-exit", 3);
|
||||||
if (args_has(args, 'm')) {
|
if (args_has(args, 'm')) {
|
||||||
|
|||||||
@@ -1364,7 +1364,7 @@ const struct options_table_entry options_table[] = {
|
|||||||
|
|
||||||
{ .name = "pane-border-lines",
|
{ .name = "pane-border-lines",
|
||||||
.type = OPTIONS_TABLE_CHOICE,
|
.type = OPTIONS_TABLE_CHOICE,
|
||||||
.scope = OPTIONS_TABLE_WINDOW,
|
.scope = OPTIONS_TABLE_WINDOW|OPTIONS_TABLE_PANE,
|
||||||
.choices = options_table_pane_border_lines_list,
|
.choices = options_table_pane_border_lines_list,
|
||||||
.default_num = PANE_LINES_SINGLE,
|
.default_num = PANE_LINES_SINGLE,
|
||||||
.text = "Type of characters used to draw pane border lines. Some of "
|
.text = "Type of characters used to draw pane border lines. Some of "
|
||||||
|
|||||||
@@ -1003,6 +1003,7 @@ screen_redraw_draw_borders_cell(struct screen_redraw_ctx *ctx, u_int i, u_int j)
|
|||||||
struct format_tree *ft;
|
struct format_tree *ft;
|
||||||
struct window_pane *wp, *active = server_client_get_pane(c);
|
struct window_pane *wp, *active = server_client_get_pane(c);
|
||||||
struct grid_cell gc;
|
struct grid_cell gc;
|
||||||
|
enum pane_lines pane_lines;
|
||||||
u_int cell_type;
|
u_int cell_type;
|
||||||
u_int x = ctx->ox + i, y = ctx->oy + j;
|
u_int x = ctx->ox + i, y = ctx->oy + j;
|
||||||
int isolates;
|
int isolates;
|
||||||
@@ -1034,7 +1035,11 @@ screen_redraw_draw_borders_cell(struct screen_redraw_ctx *ctx, u_int i, u_int j)
|
|||||||
screen_redraw_check_is(ctx, x, y, marked_pane.wp))
|
screen_redraw_check_is(ctx, x, y, marked_pane.wp))
|
||||||
gc.attr ^= GRID_ATTR_REVERSE;
|
gc.attr ^= GRID_ATTR_REVERSE;
|
||||||
}
|
}
|
||||||
screen_redraw_border_set(w, wp, ctx->pane_lines, cell_type, &gc);
|
if (wp == NULL)
|
||||||
|
pane_lines = ctx->pane_lines;
|
||||||
|
else
|
||||||
|
pane_lines = window_pane_get_pane_lines(wp);
|
||||||
|
screen_redraw_border_set(w, wp, pane_lines, cell_type, &gc);
|
||||||
|
|
||||||
if (cell_type == CELL_TOPBOTTOM &&
|
if (cell_type == CELL_TOPBOTTOM &&
|
||||||
(c->flags & CLIENT_UTF8) &&
|
(c->flags & CLIENT_UTF8) &&
|
||||||
|
|||||||
4
tmux.1
4
tmux.1
@@ -3492,6 +3492,7 @@ but a different format may be specified with
|
|||||||
.Tg newp
|
.Tg newp
|
||||||
.It Xo Ic new\-pane
|
.It Xo Ic new\-pane
|
||||||
.Op Fl bdefhIkPvWZ
|
.Op Fl bdefhIkPvWZ
|
||||||
|
.Op Fl B Ar border\-lines
|
||||||
.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
|
||||||
@@ -3523,6 +3524,9 @@ sets the border style when the pane is inactive (see
|
|||||||
.Sx STYLES ) .
|
.Sx STYLES ) .
|
||||||
.Fl T
|
.Fl T
|
||||||
sets the pane title.
|
sets the pane title.
|
||||||
|
.Fl B
|
||||||
|
sets the pane border lines for floating panes; see
|
||||||
|
.Ic pane\-border\-lines .
|
||||||
.Pp
|
.Pp
|
||||||
.Fl h
|
.Fl h
|
||||||
does a horizontal split and
|
does a horizontal split and
|
||||||
|
|||||||
1
tmux.h
1
tmux.h
@@ -3523,6 +3523,7 @@ int window_pane_get_bg_control_client(struct window_pane *);
|
|||||||
int window_get_bg_client(struct window_pane *);
|
int window_get_bg_client(struct window_pane *);
|
||||||
enum client_theme window_pane_get_theme(struct window_pane *);
|
enum client_theme window_pane_get_theme(struct window_pane *);
|
||||||
void window_pane_send_theme_update(struct window_pane *);
|
void window_pane_send_theme_update(struct window_pane *);
|
||||||
|
enum pane_lines window_pane_get_pane_lines(struct window_pane *);
|
||||||
int window_get_pane_status(struct window *);
|
int window_get_pane_status(struct window *);
|
||||||
int window_pane_get_pane_status(struct window_pane *);
|
int window_pane_get_pane_status(struct window_pane *);
|
||||||
struct style_range *window_pane_status_get_range(struct window_pane *, u_int,
|
struct style_range *window_pane_status_get_range(struct window_pane *, u_int,
|
||||||
|
|||||||
12
window.c
12
window.c
@@ -2159,6 +2159,18 @@ window_pane_status_get_range(struct window_pane *wp, u_int x, u_int y)
|
|||||||
return (style_ranges_get_range(srs, x - wp->xoff - 2));
|
return (style_ranges_get_range(srs, x - wp->xoff - 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum pane_lines
|
||||||
|
window_pane_get_pane_lines(struct window_pane *wp)
|
||||||
|
{
|
||||||
|
struct options *oo;
|
||||||
|
|
||||||
|
if (!window_pane_is_floating(wp))
|
||||||
|
oo = wp->window->options;
|
||||||
|
else
|
||||||
|
oo = wp->options;
|
||||||
|
return (options_get_number(oo, "pane-border-lines"));
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
window_get_pane_status(struct window *w)
|
window_get_pane_status(struct window *w)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user