diff options
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -2178,8 +2178,13 @@ bool buffer_save(TextBuffer *buffer) { } buffer->last_write_time = time_last_modified(buffer->filename); bool success = !buffer_haserr(buffer); - if (success) + if (success) { buffer->undo_history_write_pos = arr_len(buffer->undo_history); + char const *name = buffer->filename ? path_filename(buffer->filename) : TED_UNTITLED; + if (streq(name, "ted.cfg") && buffer_settings(buffer)->auto_reload_config) { + ted_load_configs(buffer->ted); + } + } return success; } else { buffer_seterr(buffer, "Couldn't open file %s for writing: %s.", buffer->filename, strerror(errno)); |