We can call decrementCount from decrementBuildFileRefs when the count is already zero, account for that.

This commit is contained in:
Alexandros Naskos 2020-06-18 20:52:54 +03:00
parent eab1f4783b
commit 4aa74f7980
2 changed files with 1 additions and 2 deletions

View File

@ -332,6 +332,7 @@ fn decrementBuildFileRefs(self: *DocumentStore, build_file: *BuildFile) void {
fn decrementCount(self: *DocumentStore, uri: []const u8) void {
if (self.handles.get(uri)) |entry| {
if (entry.value.count == 0) return;
entry.value.count -= 1;
if (entry.value.count > 0)

View File

@ -3,8 +3,6 @@ const DocumentStore = @import("document_store.zig");
const analysis = @import("analysis.zig");
const ast = std.zig.ast;
// TODO Some align expressions break the highlighting
const TokenType = enum(u32) {
type,
@"struct",