From bd4a63ab347acb8dd2e5a55512e3ac5255bf0f13 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 5 Oct 2026 09:03:11 +0000 Subject: [PATCH] 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]" \