fix(inline): remove hl_mode combine from link extmarks to prevent ghost underlines#516
fix(inline): remove hl_mode combine from link extmarks to prevent ghost underlines#516ImmanuelHaffner wants to merge 2 commits into
Conversation
…st underlines Remove hl_mode="combine" from the concealing extmarks in link_hyperlink and link_image. When a link URL is concealed, the virtual text highlight (e.g. underline) bled across every concealed byte, producing ghost underlines on phantom screen rows created by soft-wrap of the hidden text.
Repro for the hl_mode="combine" ghost-underline fix. Long concealed link/image URLs that soft-wrap create phantom screen rows; with hl_mode="combine" on the conceal extmark, the link highlight bleeds across every concealed byte and paints those rows. Open in a narrow window (the file carries a 'vim: set wrap linebreak' modeline) and confirm no stray underline/highlight appears on wrapped rows below the link labels. Covers long hyperlinks, images, links in narrow table cells, and several concealed links on one wrapping line.
|
This is considered an unresolvable issue as not using And the issue doesn't fully resolve with this as Vim's Until Neovim has resolved |
|
What we make this a strict opt-in through config? I use it in my fork, and it works well. Definitely better than status quo. We could have in the conf some experimental = {
link_conceal = 'combine',
}or similar. |
|
@ImmanuelHaffner What colorscheme are you using? I can't reproduce the issue on |
|
The issue manifests only on text on the cursor line, when |
|
Nailed it, the issue is |
|
@ImmanuelHaffner I still can't reproduce the issue on my machine.
Please create a |



The concealing extmark in
link_hyperlinkandlink_imagehides the](https://…)portion of a link/image, which can span hundreds of bytes. Withhl_mode = "combine"on that extmark, the virtual-text highlight (e.g. the link underline) bleeds across every concealed byte — so when the hidden URL is long enough to soft-wrap, Neovim's phantom screen rows get painted with "ghost" underlines/highlights.Removing
hl_mode = "combine"from the two conceal extmarks fixes it. (Comments added explaining why it must not be re-added.)A fixture (
test/inline_conceal_wrap.md) is included with avim: set wrap linebreakmodeline; open it in a narrow window and confirm no stray underline appears on wrapped rows below the link labels.