summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authornicm <nicm>2021-02-22 07:09:06 +0000
committernicm <nicm>2021-02-22 07:09:06 +0000
commite858270006a9041b9016ed9e6cc12d622ac8fe31 (patch)
tree75fef148467581c76f1adf59887f67a7877f2bfa /window.c
parent8986c8dfcd0083e5c767b8a247c119a25e1f8093 (diff)
There are many format variables now so allocating all the default ones
each time a tree is created is too expensive. Instead, convert them all into callbacks and put them in a static table so they only allocate on demand. The tree remains for the moment for extra (non-default) variables added by for example copy mode or popups. Also reduce expensive calls to localtime_r/strftime. GitHub issue 2253.
Diffstat (limited to 'window.c')
-rw-r--r--window.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/window.c b/window.c
index 6bfdb1cd..07ef513f 100644
--- a/window.c
+++ b/window.c
@@ -63,17 +63,6 @@ static u_int next_window_pane_id;
static u_int next_window_id;
static u_int next_active_point;
-/* List of window modes. */
-const struct window_mode *all_window_modes[] = {
- &window_buffer_mode,
- &window_client_mode,
- &window_clock_mode,
- &window_copy_mode,
- &window_tree_mode,
- &window_view_mode,
- NULL
-};
-
struct window_pane_input_data {
struct cmdq_item *item;
u_int wp;