fix(treesitter): avoid # of nil in _query_linter

This commit is contained in:
Daniel Kongsgaard 2024-01-21 17:46:14 +01:00 committed by Lewis Russell
parent 576db141be
commit 32849d5667

View File

@ -92,7 +92,7 @@ local function get_error_entry(err, node)
end_col = end_col + #underlined
elseif msg:match('^Invalid') then
-- Use the length of the problematic type/capture/field
end_col = end_col + #msg:match('"([^"]+)"')
end_col = end_col + #(msg:match('"([^"]+)"') or '')
end
return {