aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-02-28 13:36:25 +0100
committerGitHub <noreply@github.com>2025-02-28 13:36:25 +0100
commit86046c5a31034af65f128626103526269cf1bc49 (patch)
tree869a0ffeb9bd867be37516721c19fb7931f510d5 /runtime/lua/vim
parent77626ed7fd369b797dcb2ad0714a84bfd9afff36 (diff)
downloadrneovim-86046c5a31034af65f128626103526269cf1bc49.tar.gz
rneovim-86046c5a31034af65f128626103526269cf1bc49.tar.bz2
rneovim-86046c5a31034af65f128626103526269cf1bc49.zip
fix(marks): ineffective conceal_line callback optimization (#32662)
Problem: _on_conceal_line callbacks are not invoked if callback has not let Nvim know it wants to receive them. But this may change on factors other than what is currently checked (changed buffer). Solution: Forego this optimization, callback is still guarded behind 'conceallevel'.
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/treesitter/highlighter.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua
index 4d70179052..46f02628ad 100644
--- a/runtime/lua/vim/treesitter/highlighter.lua
+++ b/runtime/lua/vim/treesitter/highlighter.lua
@@ -431,7 +431,7 @@ end
function TSHighlighter._on_conceal_line(_, _, buf, row)
local self = TSHighlighter.active[buf]
if not self or not self._conceal_line or self._conceal_checked[row] then
- return self and self._conceal_line
+ return
end
-- Do not affect potentially populated highlight state.
@@ -440,7 +440,6 @@ function TSHighlighter._on_conceal_line(_, _, buf, row)
self:prepare_highlight_states(row, row)
on_line_impl(self, buf, row, false, true)
self._highlight_states = highlight_states
- return true
end
---@private