aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/treesitter/languagetree.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/treesitter/languagetree.lua b/runtime/lua/vim/treesitter/languagetree.lua
index ecace67419..5e1156fa68 100644
--- a/runtime/lua/vim/treesitter/languagetree.lua
+++ b/runtime/lua/vim/treesitter/languagetree.lua
@@ -953,7 +953,7 @@ end
--- @private
--- @return table<string, Range6[][]>
function LanguageTree:_get_injections()
- if not self._injection_query then
+ if not self._injection_query or #self._injection_query.captures == 0 then
return {}
end