summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-07-29 16:05:56 -0400
committerpommicket <pommicket@gmail.com>2022-07-29 16:05:56 -0400
commit12cc45bfcaa4c866f4509b6324a424048f3ddd29 (patch)
tree0df68f4d3d51f5468b3b1681b803e3a0c7f7d95d /ted.c
parentd9edd1f62fa620d3a8a42c80aec330065b794e14 (diff)
fix reloading with text-size
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ted.c b/ted.c
index f79ca89..52ce7ed 100644
--- a/ted.c
+++ b/ted.c
@@ -354,8 +354,8 @@ static void ted_reload_all(Ted *ted) {
}
// load/reload configs
-void ted_load_configs(Ted *ted) {
- config_free(ted);
+void ted_load_configs(Ted *ted, bool reloading) {
+ if (reloading) config_free(ted);
// copy global config to local config
char local_config_filename[TED_PATH_MAX];
@@ -386,4 +386,9 @@ void ted_load_configs(Ted *ted) {
config_read(ted, global_config_filename, 1);
config_read(ted, local_config_filename, 1);
if (ted->search_cwd) config_read(ted, TED_CFG, 1);
+
+ if (reloading) {
+ // reset text size
+ ted_load_fonts(ted);
+ }
}