diff options
author | pommicket <pommicket@gmail.com> | 2022-11-02 13:29:09 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-11-02 13:29:09 -0400 |
commit | b070e5ce01c829bd101b1e0eda49f1e25d9d125c (patch) | |
tree | f674fcbaad6b565e89d1ba973198024d958cac22 /ted.c | |
parent | 26d34216da04a2b91e65a0eeee9200ad808d48ce (diff) |
new settings system bugfixes, use ted_active_settings more
Diffstat (limited to 'ted.c')
-rw-r--r-- | ted.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -49,7 +49,7 @@ static void *ted_realloc(Ted *ted, void *p, size_t new_size) { } Settings *ted_active_settings(Ted *ted) { - return ted->active_buffer ? buffer_settings(ted->active_buffer) : ted->settings; + return ted->active_buffer ? buffer_settings(ted->active_buffer) : ted->default_settings; } u32 ted_color(Ted *ted, ColorSetting color) { @@ -206,9 +206,9 @@ static i32 ted_new_node(Ted *ted) { } // how tall is a line buffer? -static float ted_line_buffer_height(Ted const *ted) { +static float ted_line_buffer_height(Ted *ted) { float const char_height = text_font_char_height(ted->font); - return char_height + 2 * ted->settings->border_thickness; + return char_height + 2 * ted_active_settings(ted)->border_thickness; } // switch to this node @@ -386,6 +386,7 @@ void ted_load_configs(Ted *ted, bool reloading) { } config_parse(ted, &parts); + if (reloading) { // reset text size ted_load_fonts(ted); |