mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 20:40:02 -04:00
Fix: allow empty path in utils.get_at_path
This commit is contained in:
parent
06c9ef8104
commit
826683b1bf
2 changed files with 4 additions and 6 deletions
|
|
@ -189,14 +189,11 @@ function M.get_capture_matches(bufnr, capture_string, query_group, root, lang)
|
|||
end
|
||||
|
||||
function M.find_best_match(bufnr, capture_string, query_group, filter_predicate, scoring_function, root)
|
||||
if not string.sub(capture_string, 1,2) == '@' then
|
||||
api.nvim_err_writeln('capture_string must start with "@"')
|
||||
return
|
||||
if string.sub(capture_string, 1,2) == '@' then
|
||||
--remove leading "@"
|
||||
capture_string = string.sub(capture_string, 2)
|
||||
end
|
||||
|
||||
--remove leading "@"
|
||||
capture_string = string.sub(capture_string, 2)
|
||||
|
||||
local best
|
||||
local best_score
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue