summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/buffer.c b/buffer.c
index 44992bc..497afa8 100644
--- a/buffer.c
+++ b/buffer.c
@@ -3239,8 +3239,10 @@ bool buffer_save(TextBuffer *buffer) {
buffer->last_write_time = timespec_to_seconds(time_last_modified(buffer->path));
if (success) {
buffer->undo_history_write_pos = arr_len(buffer->undo_history);
- if (buffer->path && str_has_suffix(path_filename(buffer->path), "ted.cfg")
- && buffer_settings(buffer)->auto_reload_config) {
+ const char *filename = path_filename(buffer->path);
+ if (buffer->path &&
+ (str_has_suffix(filename, "ted.cfg") || streq(filename, ".editorconfig")) &&
+ buffer_settings(buffer)->auto_reload_config) {
ted_reload_configs(buffer->ted);
}
}