fix(picker.diff): make diff filename extmarks play nicely with markview / markdown-renderer

This commit is contained in:
Folke Lemaitre 2025-11-08 07:27:41 +01:00
parent c6ab18964b
commit 4f749ab355
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -174,6 +174,8 @@ function M.format_block_header(ctx)
local icon, icon_hl = Snacks.util.icon(block.file)
local file = {} ---@type snacks.picker.Highlight[]
file[#file + 1] = { " " }
-- needed to play nice with markview / markdown-renderer
file[#file + 1] = { col = 0, virt_text = { { " ", "SnacksDiffHeader" } }, virt_text_pos = "overlay" }
file[#file + 1] = { icon, icon_hl, inline = true }
file[#file + 1] = { " " }