IndentKind, config is not automatically visible on start, fix automatic ReopenBuffer

This commit is contained in:
Krzosa Karol
2026-01-04 14:00:35 +01:00
parent f059c33940
commit 04e5642ce3
5 changed files with 53 additions and 20 deletions

View File

@@ -477,16 +477,6 @@ void GarbageCollect() {
ProfileFunction();
Allocator sys_allocator = GetSystemAllocator();
For(Buffers) {
if (it->file_mod_time) {
int64_t new_file_mod_time = GetFileModTime(it->name);
if (it->file_mod_time != new_file_mod_time) {
it->changed_on_disk = true;
if (it->dirty == false) ReopenBuffer(it);
}
}
}
IterRemove(Views) {
IterRemovePrepare(Views);
@@ -665,6 +655,19 @@ void Update(Event event) {
}
}
For(Buffers) {
if (it->file_mod_time) {
int64_t new_file_mod_time = GetFileModTime(it->name);
if (it->file_mod_time != new_file_mod_time) {
it->changed_on_disk = true;
if (it->dirty == false) {
ReopenBuffer(it);
}
}
}
}
GarbageCollect();
}
@@ -913,10 +916,13 @@ int main(int argc, char **argv)
EvalCommandsLineByLine({window, view, buffer});
}
buffer->dirty = false;
if (window->active_view == view->id) {
window->active_view = NullViewID;
}
}
ReportConsolef("WorkDir = %S", WorkDir);
ReportConsolef(":Set WorkDir '%S'", WorkDir);
if (Testing) InitTests();
#if OS_WINDOWS
CoRemove("Windows_SetupVCVarsall");