Now that styles can contain formats, they need to be expanded when
authornicm <nicm@openbsd.org>
Thu, 12 Aug 2021 20:44:49 +0000 (20:44 +0000)
committernicm <nicm@openbsd.org>
Thu, 12 Aug 2021 20:44:49 +0000 (20:44 +0000)
inserted into the status line.

usr.bin/tmux/options-table.c

index a598756..b076108 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: options-table.c,v 1.149 2021/08/11 20:49:55 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.150 2021/08/12 20:44:49 nicm Exp $ */
 
 /*
  * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -81,7 +81,7 @@ static const char *options_table_extended_keys_list[] = {
 
 /* Status line format. */
 #define OPTIONS_TABLE_STATUS_FORMAT1 \
-       "#[align=left range=left #{status-left-style}]" \
+       "#[align=left range=left #{E:status-left-style}]" \
        "#[push-default]" \
        "#{T;=/#{status-left-length}:status-left}" \
        "#[pop-default]" \
@@ -90,20 +90,20 @@ static const char *options_table_extended_keys_list[] = {
        "#[list=left-marker]<#[list=right-marker]>#[list=on]" \
        "#{W:" \
                "#[range=window|#{window_index} " \
-                       "#{window-status-style}" \
+                       "#{E:window-status-style}" \
                        "#{?#{&&:#{window_last_flag}," \
-                               "#{!=:#{window-status-last-style},default}}, " \
-                               "#{window-status-last-style}," \
+                               "#{!=:#{E:window-status-last-style},default}}, " \
+                               "#{E:window-status-last-style}," \
                        "}" \
                        "#{?#{&&:#{window_bell_flag}," \
-                               "#{!=:#{window-status-bell-style},default}}, " \
-                               "#{window-status-bell-style}," \
+                               "#{!=:#{E:window-status-bell-style},default}}, " \
+                               "#{E:window-status-bell-style}," \
                                "#{?#{&&:#{||:#{window_activity_flag}," \
                                             "#{window_silence_flag}}," \
                                        "#{!=:" \
-                                       "#{window-status-activity-style}," \
+                                       "#{E:window-status-activity-style}," \
                                        "default}}, " \
-                                       "#{window-status-activity-style}," \
+                                       "#{E:window-status-activity-style}," \
                                "}" \
                        "}" \
                "]" \
@@ -114,23 +114,23 @@ static const char *options_table_extended_keys_list[] = {
                "#{?window_end_flag,,#{window-status-separator}}" \
        "," \
                "#[range=window|#{window_index} list=focus " \
-                       "#{?#{!=:#{window-status-current-style},default}," \
-                               "#{window-status-current-style}," \
-                               "#{window-status-style}" \
+                       "#{?#{!=:#{E:window-status-current-style},default}," \
+                               "#{E:window-status-current-style}," \
+                               "#{E:window-status-style}" \
                        "}" \
                        "#{?#{&&:#{window_last_flag}," \
-                               "#{!=:#{window-status-last-style},default}}, " \
-                               "#{window-status-last-style}," \
+                               "#{!=:#{E:window-status-last-style},default}}, " \
+                               "#{E:window-status-last-style}," \
                        "}" \
                        "#{?#{&&:#{window_bell_flag}," \
-                               "#{!=:#{window-status-bell-style},default}}, " \
-                               "#{window-status-bell-style}," \
+                               "#{!=:#{E:window-status-bell-style},default}}, " \
+                               "#{E:window-status-bell-style}," \
                                "#{?#{&&:#{||:#{window_activity_flag}," \
                                             "#{window_silence_flag}}," \
                                        "#{!=:" \
-                                       "#{window-status-activity-style}," \
+                                       "#{E:window-status-activity-style}," \
                                        "default}}, " \
-                                       "#{window-status-activity-style}," \
+                                       "#{E:window-status-activity-style}," \
                                "}" \
                        "}" \
                "]" \
@@ -140,7 +140,7 @@ static const char *options_table_extended_keys_list[] = {
                "#[norange list=on default]" \
                "#{?window_end_flag,,#{window-status-separator}}" \
        "}" \
-       "#[nolist align=right range=right #{status-right-style}]" \
+       "#[nolist align=right range=right #{E:status-right-style}]" \
        "#[push-default]" \
        "#{T;=/#{status-right-length}:status-right}" \
        "#[pop-default]" \