mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-04 07:15:29 -04:00
config: avoid tll() code expansion when generating default bindings
tll_push_back() is a macro that results in quite a lot of instructions. Expanding this macro explicitly in many places thus causes code explosion. This is what happened in when we generate the default key/mouse bindings. Fix by calling tll_push_back() in a no-inline function. Reduces code size with ~4-5K
This commit is contained in:
parent
449ac7c361
commit
ba2c3606bf
2 changed files with 34 additions and 29 deletions
3
config.h
3
config.h
|
|
@ -52,6 +52,7 @@ struct config_mouse_binding {
|
|||
int count;
|
||||
struct config_binding_pipe pipe;
|
||||
};
|
||||
typedef tll(struct config_mouse_binding) config_mouse_binding_list_t;
|
||||
|
||||
struct config_spawn_template {
|
||||
char *raw_cmd;
|
||||
|
|
@ -166,7 +167,7 @@ struct config {
|
|||
struct {
|
||||
/* Bindings for "normal" mode */
|
||||
config_key_binding_list_t key;
|
||||
tll(struct config_mouse_binding) mouse;
|
||||
config_mouse_binding_list_t mouse;
|
||||
|
||||
/*
|
||||
* Special modes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue