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'. --- test/functional/plugin/lsp/utils_spec.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/functional/plugin') diff --git a/test/functional/plugin/lsp/utils_spec.lua b/test/functional/plugin/lsp/utils_spec.lua index 2a7d877eb1..ccefc3cb99 100644 --- a/test/functional/plugin/lsp/utils_spec.lua +++ b/test/functional/plugin/lsp/utils_spec.lua @@ -366,5 +366,21 @@ describe('vim.lsp.util', function() {1:~ }|*9 | ]]) + -- Correct height when float inherits 'conceallevel' >= 2 #32639 + command('close | set conceallevel=2') + exec_lua([[ + vim.lsp.util.open_floating_preview({ '```lua', 'local foo', '```' }, 'markdown', { + border = 'single', + focus = false, + }) + ]]) + screen:expect([[ + ^ | + ┌─────────┐{1: }| + │{100:local}{101: }{102:foo}│{1: }| + └─────────┘{1: }| + {1:~ }|*9 + | + ]]) end) end) -- cgit