summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-10-19 10:45:34 -0400
committerpommicket <pommicket@gmail.com>2023-10-19 10:45:34 -0400
commit69d702f2076930b8cc88c73420fc849eb4b807ce (patch)
tree41547166457ba5b0710f077f98eba3ae37872404 /buffer.c
parent30f37caf7d9facf7698d01ef77d7da93e7316103 (diff)
editorconfig seems to be working
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);
}
}