neovim/runtime/lua
Lewis Russell ac2dff64a5 fix(treesitter): make sure injections don't return empty ranges (#24595)
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.
2023-08-10 18:08:54 +02:00
..
nvim fix(health): iterate using ipairs correctly (#22119) 2023-02-06 12:24:00 +08:00
vim fix(treesitter): make sure injections don't return empty ranges (#24595) 2023-08-10 18:08:54 +02:00
_vim9script.lua feat(api): nvim_exec2(), deprecate nvim_exec() #19032 2023-03-25 09:58:48 -07:00
editorconfig.lua fix(editorconfig): check that buffer is valid 2023-06-05 16:53:33 +00:00
man.lua fix(man.lua): return support of all sections 2023-05-08 08:09:54 +00:00