From 86046c5a31034af65f128626103526269cf1bc49 Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Fri, 28 Feb 2025 13:36:25 +0100 Subject: 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'. --- runtime/lua/vim/treesitter/highlighter.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/lua/vim') 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 -- cgit