wilder.nvim icon indicating copy to clipboard operation
wilder.nvim copied to clipboard

Neovim floating window visual artifacts

Open gelguy opened this issue 3 years ago • 2 comments

wilder#wildmenu_renderer() with mode: float and wilder#popupmenu_renderer() will sometimes leave behind visual artifacts which cannot be cleared with redraw.

The visual artifacts can be cleared by causing the grid chars to be redrawn e.g. by scrolling.

Most commonly occurs when the cmdline width exceeds cmdheight so the floats have to be drawn over the cmdline.

gelguy avatar Mar 17 '21 15:03 gelguy

I am not sure if this the issue but this is what I'm seeing: image I don't think the little white boxes are normal.

SeniorMars avatar Dec 02 '21 18:12 SeniorMars

This isn't a visual artifact - it's actually the scrollbar! Your font doesn't render █ as a full height glyph, that's why there's spaces between the scrollbar characters.

The workaround for this is to use a ' ' space and invert the guifg and guibg of the thumb highlight:

hi InvertedPmenuThumb guifg=<guibg of PmenuThumb> guibg=<guifg of PmenuThumb>
call wilder#set_option('renderer', wilder#popupmenu_renderer({
      \ 'left': [' '],
      \ 'right': [' ', wilder#popupmenu_scrollbar({'thumb_char': ' ', 'thumb_hl': 'InvertedPmenuThumb')],
      \ ... other options ...
      \ }))

gelguy avatar Dec 03 '21 00:12 gelguy