Skip to content

Commit 5fd35f7

Browse files
maxxninoSuperAuguste
authored andcommitted
Fix #389
1 parent f9133ff commit 5fd35f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/DocumentStore.zig

+6
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ fn newDocument(self: *DocumentStore, uri: []const u8, text: [:0]u8) anyerror!*Ha
291291
}
292292
}
293293

294+
// Check if the build file already exists
295+
if (self.handles.get(build_file_uri)) |build_file_handle| {
296+
candidate = build_file_handle.is_build_file.?;
297+
break;
298+
}
299+
294300
// Read the build file, create a new document, set the candidate to the new build file.
295301
const build_file_text = try build_file.readToEndAllocOptions(
296302
self.allocator,

0 commit comments

Comments
 (0)