aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/highlighter.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2025-02-16 00:07:08 +0100
committerChristian Clason <ch.clason+github@icloud.com>2025-02-19 19:11:55 +0100
commitbc1018a8d3eeeade9b3fad147a9d9a819985d69d (patch)
treef6914bad1ab76bfeacfdc7f2b597658cfd3b2d84 /runtime/lua/vim/treesitter/highlighter.lua
parenta0b52e7cb3d211e30c21464c4a4f4acecd6418c9 (diff)
downloadrneovim-bc1018a8d3eeeade9b3fad147a9d9a819985d69d.tar.gz
rneovim-bc1018a8d3eeeade9b3fad147a9d9a819985d69d.tar.bz2
rneovim-bc1018a8d3eeeade9b3fad147a9d9a819985d69d.zip
fix(treesitter): avoid computing fold levels for empty buffer
Problem: Computing fold levels for an empty buffer (somehow) breaks the parser state, resulting in a broken highlighter and foldexpr. Cached foldexpr parser is invalid after filetype has changed. Solution: Avoid computing fold levels for empty buffer. Clear cached foldinfos upon `FileType`.
Diffstat (limited to 'runtime/lua/vim/treesitter/highlighter.lua')
0 files changed, 0 insertions, 0 deletions