commit 32849d56671cc74d7a1b0858638c698444ac237f parent 576db141be6e4d9b5d9b840c599bac670df25d1a Author: Daniel Kongsgaard <dakongsgaard@gmail.com> Date: Sun, 21 Jan 2024 17:46:14 +0100 fix(treesitter): avoid # of nil in _query_linter Diffstat:
| M | runtime/lua/vim/treesitter/_query_linter.lua | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/runtime/lua/vim/treesitter/_query_linter.lua b/runtime/lua/vim/treesitter/_query_linter.lua @@ -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 {