commit d5bdf2034237dab92ef6a155917376e245206d19 from: Omar Polo date: Thu Jul 08 14:04:49 2021 UTC initialize the keys before reading the configuration commit - d254498948dc2abda7c283e671d747be67d99a18 commit + d5bdf2034237dab92ef6a155917376e245206d19 blob - cd81b211e7caffceca6749147016f0e168eb48ed blob + 5487f1e7cca9f45ca47f3d22673e5510aa21bc43 --- telescope.c +++ telescope.c @@ -736,6 +736,11 @@ main(int argc, char * const *argv) * and dropping the priviledges we need to read some stuff. */ fs_init(); + /* setup keys before reading the config */ + TAILQ_INIT(&global_map.m); + global_map.unhandled_input = global_key_unbound; + TAILQ_INIT(&minibuffer_map.m); + config_init(); parseconfig(path, fail); if (configtest){ blob - c36446b1e7b9bad76590c8c8433d642f54646ef6 blob + 82231939a93f4c0b653475c37143c471303d7876 --- telescope.h +++ telescope.h @@ -478,6 +478,7 @@ extern struct ministate ministate; void save_excursion(struct excursion *, struct buffer *); void restore_excursion(struct excursion *, struct buffer *); +void global_key_unbound(void); void minibuffer_taint_hist(void); void eecmd_self_insert(void); void eecmd_select(void); blob - 0ace57df30c79c5e9397a143af208e15730ce943 blob + 148e42096757058cfc24587f069d1295bf761927 --- ui.c +++ ui.c @@ -45,7 +45,6 @@ static struct event stdioev, winchev; static void restore_curs_x(struct buffer *); -static void global_key_unbound(void); static void minibuffer_hist_save_entry(void); static void minibuffer_self_insert(void); static void yornp_self_insert(void); @@ -170,7 +169,7 @@ restore_curs_x(struct buffer *buffer) } } -static void +void global_key_unbound(void) { message("%s is undefined", keybuf); @@ -1279,12 +1278,6 @@ new_tab(const char *url) int ui_init() { - /* setup keys before reading the config */ - TAILQ_INIT(&global_map.m); - global_map.unhandled_input = global_key_unbound; - - TAILQ_INIT(&minibuffer_map.m); - setlocale(LC_ALL, ""); TAILQ_INIT(&eecmd_history.head);