aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_defaults.lua
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2025-10-01 17:31:52 -0700
committerGitHub <noreply@github.com>2025-10-01 17:31:52 -0700
commitb4016f4525ddb1a2fd2c093f59de9629c804f45c (patch)
treef21a62d7ac1940ee6fa2acfdf69cd3670add9e55 /runtime/lua/vim/_defaults.lua
parent89dc889c3d07c7e9f0632243967cd8ae8e53789c (diff)
downloadrneovim-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