Also free the sane text when releasing a document
This commit is contained in:
parent
6ac068a3c5
commit
6ed45a1f23
@ -85,6 +85,9 @@ pub fn openDocument(uri: []const u8, text: []const u8) !void {
|
||||
try log("Opened already open file: {}", .{uri});
|
||||
allocator.free(existing_entry.key);
|
||||
allocator.free(existing_entry.value.mem);
|
||||
if (existing_entry.value.sane_text) |str| {
|
||||
allocator.free(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user