diff options
| author | Riley Bruins <ribru17@hotmail.com> | 2025-10-01 17:31:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-01 17:31:52 -0700 |
| commit | b4016f4525ddb1a2fd2c093f59de9629c804f45c (patch) | |
| tree | f21a62d7ac1940ee6fa2acfdf69cd3670add9e55 /runtime/lua/vim/_defaults.lua | |
| parent | 89dc889c3d07c7e9f0632243967cd8ae8e53789c (diff) | |
| download | rneovim-b4016f4525ddb1a2fd2c093f59de9629c804f45c.tar.gz rneovim-b4016f4525ddb1a2fd2c093f59de9629c804f45c.tar.bz2 rneovim-b4016f4525ddb1a2fd2c093f59de9629c804f45c.zip | |
fix(treesitter): don't add final newline if not present #35970
**Problem(?):** Buffers that (for whatever reason) aren't meant to have
a final newline are still parsed with a final newline in `treesitter.c`.
**Solution:** Don't add the newline to the last buffer line if it
shouldn't be there. (This more closely matches the approach of
`read_buffer_into()`.)
This allows us to, say, use a scratch buffer with `noeol` and `nofixeol`
behind the scenes in `get_string_parser()`.
...which would allow us to track injection trees with extmarks in that
case.
...which would allow us to not drop previous trees after reparsing a
different range with `get_parser():parse()`.
...which would prevent flickering when editing a buffer that has 2+
windows to it in view at a time.
...which would allow us to keep our sanity!!!
(one step at a time...)
Diffstat (limited to 'runtime/lua/vim/_defaults.lua')
0 files changed, 0 insertions, 0 deletions