aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/_fold.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-10-03 13:07:03 +0800
committerGitHub <noreply@github.com>2023-10-03 13:07:03 +0800
commit3af59a415c98afc42755308e56912b302ad5eb3d (patch)
tree352f5cc8057aed07ff4deae75945429a07f3837e /runtime/lua/vim/treesitter/_fold.lua
parent04af9d49ee9f29a578d0891af20857fea45b674b (diff)
downloadrneovim-3af59a415c98afc42755308e56912b302ad5eb3d.tar.gz
rneovim-3af59a415c98afc42755308e56912b302ad5eb3d.tar.bz2
rneovim-3af59a415c98afc42755308e56912b302ad5eb3d.zip
fix(treesitter): make Visual hl work consistently with foldtext (#25484)
Problem: Visual highlight is inconsistent on a folded line with treesitter foldtext. Solution: Don't added Folded highlight as it is already in background.
Diffstat (limited to 'runtime/lua/vim/treesitter/_fold.lua')
-rw-r--r--runtime/lua/vim/treesitter/_fold.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/treesitter/_fold.lua b/runtime/lua/vim/treesitter/_fold.lua
index c6a4b48d4f..5c1cc06908 100644
--- a/runtime/lua/vim/treesitter/_fold.lua
+++ b/runtime/lua/vim/treesitter/_fold.lua
@@ -401,7 +401,7 @@ function M.foldtext()
if start_col > line_pos then
table.insert(result, {
line:sub(line_pos + 1, start_col),
- { { 'Folded', priority } },
+ {},
range = { line_pos, start_col },
})
end