summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-05 21:51:08 -0400
committerpommicket <pommicket@gmail.com>2023-08-05 21:51:08 -0400
commitbcb5589f17f755b965dec49af3232a5a69a8e68f (patch)
treecefcf8b3c42e56038e1902bfae53fff8508c7b98 /ted.c
parent9e68c6f3dd0b90f908c31c02fedb4b51836d4c8e (diff)
some cleanup
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ted.c b/ted.c
index c623f0a..ea28f13 100644
--- a/ted.c
+++ b/ted.c
@@ -471,7 +471,7 @@ void ted_reset_active_buffer(Ted *ted) {
}
-i32 ted_new_buffer(Ted *ted) {
+static i32 ted_new_buffer(Ted *ted) {
bool *buffers_used = ted->buffers_used;
for (i32 i = 1; // start from 1, so as not to use the null buffer
i < TED_MAX_BUFFERS; ++i) {
@@ -678,8 +678,7 @@ void ted_reload_all(Ted *ted) {
}
// load/reload configs
-void ted_load_configs(Ted *ted, bool reloading) {
- if (reloading) config_free(ted);
+void ted_load_configs(Ted *ted) {
// copy global config to local config
char local_config_filename[TED_PATH_MAX];
@@ -708,12 +707,13 @@ void ted_load_configs(Ted *ted, bool reloading) {
config_read(ted, &parts, start_cwd_filename);
}
config_parse(ted, &parts);
-
-
- if (reloading) {
- // reset text size
- ted_load_fonts(ted);
- }
+}
+
+void ted_reload_configs(Ted *ted) {
+ config_free(ted);
+ ted_load_configs(ted);
+ // reset text size
+ ted_load_fonts(ted);
}
void ted_press_key(Ted *ted, SDL_Keycode keycode, SDL_Keymod modifier) {