summaryrefslogtreecommitdiffstats
path: root/tmux.h
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 /tmux.h
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 'tmux.h')
-rw-r--r--tmux.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/tmux.h b/tmux.h
index 4339f6a7..f3f6a867 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1944,7 +1944,7 @@ char *paste_make_sample(struct paste_buffer *);
#define FORMAT_WINDOW 0x40000000U
struct format_tree;
struct format_modifier;
-typedef char *(*format_cb)(struct format_tree *);
+typedef void *(*format_cb)(struct format_tree *);
const char *format_skip(const char *, const char *);
int format_true(const char *);
struct format_tree *format_create(struct client *, struct cmdq_item *, int,
@@ -2713,7 +2713,6 @@ void screen_alternate_off(struct screen *, struct grid_cell *, int);
/* window.c */
extern struct windows windows;
extern struct window_pane_tree all_window_panes;
-extern const struct window_mode *all_window_modes[];
int window_cmp(struct window *, struct window *);
RB_PROTOTYPE(windows, window, entry, window_cmp);
int winlink_cmp(struct winlink *, struct winlink *);