aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2025-02-15 01:53:41 +0100
committerChristian Clason <ch.clason+github@icloud.com>2025-02-19 19:11:55 +0100
commita0b52e7cb3d211e30c21464c4a4f4acecd6418c9 (patch)
tree95b73831fde6183b55520d84a165ba36544216aa /runtime/doc
parenta422f3393e93ae19d679520f43f38bd1c53ddf06 (diff)
downloadrneovim-a0b52e7cb3d211e30c21464c4a4f4acecd6418c9.tar.gz
rneovim-a0b52e7cb3d211e30c21464c4a4f4acecd6418c9.tar.bz2
rneovim-a0b52e7cb3d211e30c21464c4a4f4acecd6418c9.zip
fix(treesitter)!: enforce buffer is loaded when creating parser
Problem: `vim.treesitter._create_parser()` silently loads the buffer, bypassing the swapfile prompt. Solution: Error for an unloaded buffer, ensure buffer is loaded in `vim.treesitter.start()` instead.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/news.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 226c927d87..da672f449c 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -175,6 +175,7 @@ TREESITTER
the tree before returning. Scripts must call |LanguageTree:parse()| explicitly. >lua
local p = vim.treesitter.get_parser(0, 'c')
p:parse()
+• |vim.treesitter.get_parser()| expects its buffer to be loaded.
<
TUI