We can call decrementCount from decrementBuildFileRefs when the count is already zero, account for that.
This commit is contained in:
parent
eab1f4783b
commit
4aa74f7980
@ -332,6 +332,7 @@ fn decrementBuildFileRefs(self: *DocumentStore, build_file: *BuildFile) void {
|
|||||||
|
|
||||||
fn decrementCount(self: *DocumentStore, uri: []const u8) void {
|
fn decrementCount(self: *DocumentStore, uri: []const u8) void {
|
||||||
if (self.handles.get(uri)) |entry| {
|
if (self.handles.get(uri)) |entry| {
|
||||||
|
if (entry.value.count == 0) return;
|
||||||
entry.value.count -= 1;
|
entry.value.count -= 1;
|
||||||
|
|
||||||
if (entry.value.count > 0)
|
if (entry.value.count > 0)
|
||||||
|
@ -3,8 +3,6 @@ const DocumentStore = @import("document_store.zig");
|
|||||||
const analysis = @import("analysis.zig");
|
const analysis = @import("analysis.zig");
|
||||||
const ast = std.zig.ast;
|
const ast = std.zig.ast;
|
||||||
|
|
||||||
// TODO Some align expressions break the highlighting
|
|
||||||
|
|
||||||
const TokenType = enum(u32) {
|
const TokenType = enum(u32) {
|
||||||
type,
|
type,
|
||||||
@"struct",
|
@"struct",
|
||||||
|
Loading…
Reference in New Issue
Block a user