mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 21:55:17 -07:00
ac2dff64a5
When an injection has not set include children, make sure not to add the injection if no ranges are determined. This could happen when there is an injection with a child that has the same range as itself. e.g. consider this Makefile snippet ```make foo: $(VAR) ``` Line 2 has an injection for bash and a make variable reference. If include-children isn't set (default), then there is no range on line 2 to inject since the variable reference needs to be excluded. This caused the language tree to return an empty range, which the parser now interprets to mean the full buffer. This caused makefiles to have completely broken highlighting. |
||
---|---|---|
.. | ||
highlight_spec.lua | ||
language_spec.lua | ||
node_spec.lua | ||
parser_spec.lua | ||
utils_spec.lua |