From 325b40e8c42fbb089fe5a3f63ba5164f29b6d891 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 11 Sep 2026 10:17:16 +0000 Subject: [PATCH] Add rounded borders option for panes like popups. --- options-table.c | 5 +++-- tmux.1 | 6 ++++-- tmux.h | 5 +++-- window-border.c | 6 +++++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/options-table.c b/options-table.c index 13a132fd0..242a1a573 100644 --- a/options-table.c +++ b/options-table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options-table.c,v 1.245 2026/09/10 11:02:18 nicm Exp $ */ +/* $OpenBSD: options-table.c,v 1.246 2026/09/11 10:17:16 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -77,7 +77,8 @@ static const char *options_table_pane_border_indicators_list[] = { "off", "colour", "arrows", "both", NULL }; static const char *options_table_pane_border_lines_list[] = { - "single", "double", "heavy", "simple", "number", "spaces", "none", NULL + "single", "double", "heavy", "simple", "number", "spaces", "none", + "rounded", NULL }; static const char *options_table_popup_border_lines_list[] = { "single", "double", "heavy", "simple", "rounded", "padded", "none", NULL diff --git a/tmux.1 b/tmux.1 index 41f0c234e..2c517b56e 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.1169 2026/09/10 11:02:18 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.1170 2026/09/11 10:17:16 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: September 10 2026 $ +.Dd $Mdocdate: September 11 2026 $ .Dt TMUX 1 .Os .Sh NAME @@ -5978,6 +5978,8 @@ single lines using ACS or UTF\-8 characters double lines using UTF\-8 characters .It heavy heavy lines using UTF\-8 characters +.It rounded +single lines with rounded corners using UTF\-8 characters .It simple simple ASCII characters .It number diff --git a/tmux.h b/tmux.h index 83c29bdb0..4f5957a6a 100644 --- a/tmux.h +++ b/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.1439 2026/09/10 11:02:18 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.1440 2026/09/11 10:17:16 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1116,7 +1116,8 @@ enum pane_lines { PANE_LINES_SIMPLE, PANE_LINES_NUMBER, PANE_LINES_SPACES, - PANE_LINES_NONE + PANE_LINES_NONE, + PANE_LINES_ROUNDED }; /* Pane border indicator option. */ diff --git a/window-border.c b/window-border.c index 8f2209d0e..a9bb664e2 100644 --- a/window-border.c +++ b/window-border.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-border.c,v 1.3 2026/07/23 09:38:27 nicm Exp $ */ +/* $OpenBSD: window-border.c,v 1.4 2026/09/11 10:17:16 nicm Exp $ */ /* * Copyright (c) 2026 Nicholas Marriott @@ -120,6 +120,10 @@ window_get_border_cell(struct window_pane *wp, enum pane_lines pane_lines, gc->attr &= ~GRID_ATTR_CHARSET; utf8_copy(&gc->data, tty_acs_heavy_borders(cell_type)); break; + case PANE_LINES_ROUNDED: + gc->attr &= ~GRID_ATTR_CHARSET; + utf8_copy(&gc->data, tty_acs_rounded_borders(cell_type)); + break; case PANE_LINES_SIMPLE: gc->attr &= ~GRID_ATTR_CHARSET; utf8_set(&gc->data, SIMPLE_BORDERS[cell_type]);