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.
This commit is contained in:
zeertzjq
2023-10-03 13:07:03 +08:00
committed by GitHub
parent 04af9d49ee
commit 3af59a415c
2 changed files with 61 additions and 120 deletions

View File

@@ -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