From a1fd084d192d2a0993e0d0c725adc63c079505ae Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 5 Oct 2026 08:32:24 +0000 Subject: [PATCH 1/4] Adjust widths of a few codepoints incorrectly set to double width, from Sidney Cammeresi. --- utf8-combined.c | 8 +++++++- utf8.c | 6 +----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/utf8-combined.c b/utf8-combined.c index 02abc3518..78a34074d 100644 --- a/utf8-combined.c +++ b/utf8-combined.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utf8-combined.c,v 1.10 2026/06/09 11:49:36 nicm Exp $ */ +/* $OpenBSD: utf8-combined.c,v 1.11 2026/10/05 08:32:24 nicm Exp $ */ /* * Copyright (c) 2023 Nicholas Marriott @@ -121,6 +121,12 @@ utf8_should_combine(const struct utf8_data *with, const struct utf8_data *add) /* Emoji skin tone modifiers. */ switch (a) { + case 0x0261D: + case 0x026F9: + case 0x0270A: + case 0x0270B: + case 0x0270C: + case 0x0270D: case 0x1F44B: case 0x1F44C: case 0x1F44D: diff --git a/utf8.c b/utf8.c index c36b4e4b2..569b5c02a 100644 --- a/utf8.c +++ b/utf8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utf8.c,v 1.73 2026/09/20 08:11:00 nicm Exp $ */ +/* $OpenBSD: utf8.c,v 1.74 2026/10/05 08:32:24 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -50,12 +50,8 @@ static struct utf8_width_cache utf8_width_cache = RB_INITIALIZER(utf8_width_cache); static struct utf8_width_item utf8_default_width_cache[] = { - { .wc = 0x0261D, .width = 2 }, - { .wc = 0x026F9, .width = 2 }, { .wc = 0x0270A, .width = 2 }, { .wc = 0x0270B, .width = 2 }, - { .wc = 0x0270C, .width = 2 }, - { .wc = 0x0270D, .width = 2 }, { .wc = 0x1F1E6, .width = 1 }, { .wc = 0x1F1E7, .width = 1 }, { .wc = 0x1F1E8, .width = 1 }, From 3f5d0540057b1eda9229eb1bc80fed55aca816e6 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 5 Oct 2026 08:41:23 +0000 Subject: [PATCH 2/4] Do not lose a pending pane resize when entering the alternate screen, from mml00 dot work at gmail dot com. --- screen-write.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/screen-write.c b/screen-write.c index 905f9a4c7..b37dd6283 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.298 2026/10/02 15:20:41 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.299 2026/10/05 08:41:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -3154,6 +3154,7 @@ screen_write_alternateon(struct screen_write_ctx *ctx, struct grid_cell *gc, { struct tty_ctx ttyctx; struct window_pane *wp = ctx->wp; + int pending; if (wp != NULL && !options_get_number(wp->options, "alternate-screen")) return; @@ -3163,11 +3164,12 @@ screen_write_alternateon(struct screen_write_ctx *ctx, struct grid_cell *gc, return; if (wp != NULL) { + pending = !TAILQ_EMPTY(&wp->resize_queue); window_pane_clear_resizes(wp, NULL); if (event_initialized(&wp->resize_timer)) evtimer_del(&wp->resize_timer); layout_fix_panes(wp->window, NULL); - if (!TAILQ_EMPTY(&wp->resize_queue)) { + if (pending || !TAILQ_EMPTY(&wp->resize_queue)) { window_pane_send_resize(wp, wp->sx, wp->sy); window_pane_clear_resizes(wp, NULL); } From 0e701cbe929611c78e8e330c00e52e3aa8087f9c Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 5 Oct 2026 08:45:27 +0000 Subject: [PATCH 3/4] Fix color range check, from Vaibhav Aggarwal. --- tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tty.c b/tty.c index ac5ceb3e2..602465ff5 100644 --- a/tty.c +++ b/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.483 2026/10/02 12:48:52 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.484 2026/10/05 08:45:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -2705,7 +2705,7 @@ tty_colours_fg(struct tty *tty, const struct grid_cell *gc) * reset because some terminals do not clear bright correctly. */ if (tty->cell.fg >= 90 && - tty->cell.bg <= 97 && + tty->cell.fg <= 97 && (gc->fg < 90 || gc->fg > 97)) tty_reset(tty); From bd4a63ab347acb8dd2e5a55512e3ac5255bf0f13 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 5 Oct 2026 09:03:11 +0000 Subject: [PATCH 4/4] Use window-status-separator in second and theird status lines, GitHub issue 5672. Also match width of session name correctly. --- options-table.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/options-table.c b/options-table.c index db925233d..cfe318e12 100644 --- a/options-table.c +++ b/options-table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options-table.c,v 1.248 2026/10/02 15:04:27 nicm Exp $ */ +/* $OpenBSD: options-table.c,v 1.249 2026/10/05 09:03:11 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -184,7 +184,8 @@ static const char *options_table_copy_mode_line_numbers_list[] = { "#[pop-default]" \ "#[norange default]" #define OPTIONS_TABLE_STATUS_FORMAT2 \ - "#[align=left]#{R: ,#{n:#{session_name}}}P: " \ + "#[align=left]" \ + "#{R: ,#{e|-:#{w;T;=/#{status-left-length}:status-left},3}}P: " \ "#[norange default]" \ "#[list=on align=#{status-justify}]" \ "#[list=left-marker]<#[list=right-marker]>#[list=on]" \ @@ -195,7 +196,8 @@ static const char *options_table_copy_mode_line_numbers_list[] = { "#[push-default]" \ "#{T:window-pane-status-format}" \ "#[pop-default]" \ - "#[norange list=on default] " \ + "#[norange list=on default]" \ + "#{?loop_last_flag,,#{E:window-status-separator}}" \ "," \ "#[range=pane|#{pane_id} list=focus " \ "#{?#{!=:#{E:pane-status-current-style},default}," \ @@ -206,10 +208,12 @@ static const char *options_table_copy_mode_line_numbers_list[] = { "#[push-default]" \ "#{T:window-pane-current-status-format}" \ "#[pop-default]" \ - "#[norange list=on default] " \ + "#[norange list=on default]" \ + "#{?loop_last_flag,,#{E:window-status-separator}}" \ "}" #define OPTIONS_TABLE_STATUS_FORMAT3 \ - "#[align=left]#{R: ,#{n:#{session_name}}}S: " \ + "#[align=left]" \ + "#{R: ,#{e|-:#{w;T;=/#{status-left-length}:status-left},3}}S: " \ "#[norange default]" \ "#[list=on align=#{status-justify}]" \ "#[list=left-marker]<#[list=right-marker]>#[list=on]" \