summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-10-17 10:36:53 -0400
committerpommicket <pommicket@gmail.com>2023-10-17 10:36:53 -0400
commit6ea5c07b116b98ebc836a10f88cf908d14c9b6c5 (patch)
treeb9ae3cf7aca9cde2cc69bdc194fa5513664625bb /ted.c
parent9842cb988343d255db17ed57d486ecc41fc0618e (diff)
new config system seems to be working
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ted.c b/ted.c
index 06c3db1..e8608b2 100644
--- a/ted.c
+++ b/ted.c
@@ -225,7 +225,6 @@ static int applicable_configs_cmp(void *context, const void *av, const void *bv)
void ted_compute_settings(Ted *ted, const char *path, Language language, Settings *settings) {
settings_free(settings);
- memset(settings, 0, sizeof *settings);
u32 *applicable_configs = NULL;
for (u32 i = 0; i < arr_len(ted->all_configs); i++) {
Config *cfg = &ted->all_configs[i];
@@ -742,8 +741,10 @@ void ted_load_configs(Ted *ted) {
void ted_reload_configs(Ted *ted) {
config_free_all(ted);
ted_load_configs(ted);
- // reset text size
ted_load_fonts(ted);
+ arr_foreach_ptr(ted->buffers, TextBufferPtr, pbuf) {
+ buffer_recompute_settings(*pbuf);
+ }
}
void ted_press_key(Ted *ted, SDL_Keycode keycode, SDL_Keymod modifier) {