Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flicker in help files when searching #141

Open
Frederick888 opened this issue Jun 10, 2022 · 3 comments
Open

Flicker in help files when searching #141

Frederick888 opened this issue Jun 10, 2022 · 3 comments
Labels
bug Something isn't working neovim

Comments

@Frederick888
Copy link

When searching in Vim help files (:h xxx), wilder#wildmenu_renderer causes background of current match to flicker. I haven't observed this issue in other file types.

Neovim version:

NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

vimrc to reproduce this issue:

set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath

function! UpdateRemotePlugins(...)
  if !has('nvim')
    return
  endif
  " Needed to refresh runtime files
  let &rtp=&rtp
  UpdateRemotePlugins
endfunction

call plug#begin('~/.vim/plugged')
Plug 'gelguy/wilder.nvim', { 'do': function('UpdateRemotePlugins') }
call plug#end()

set nocompatible
set updatetime=300
set cmdheight=2

" wilder.nvim
call wilder#enable_cmdline_enter()
set wildcharm=<Tab>
cmap <expr> <Tab> wilder#in_context() ? wilder#next() : "\<Tab>"
cmap <expr> <S-Tab> wilder#in_context() ? wilder#previous() : "\<S-Tab>"
cmap <expr> <C-n> wilder#in_context() ? wilder#next() : "\<C-n>"
cmap <expr> <C-p> wilder#in_context() ? wilder#previous() : "\<C-p>"
call wilder#set_option('modes', ['/', '?', ':'])
call wilder#set_option('pipeline', [
      \   wilder#branch(
      \     [
      \       wilder#check({ _, x -> empty(x) }),
      \       wilder#history(),
      \       wilder#result({
      \         'draw': [{ _, x -> '' . x }],
      \         }),
      \     ],
      \     [wilder#check({ _, x -> !(stridx(x, 'Man ') == 0 && strlen(x) < 6) })] + wilder#cmdline_pipeline({ 'debounce': 100 }),
      \     wilder#vim_search_pipeline(),
      \   ),
      \ ])
call wilder#set_option('renderer', wilder#renderer_mux({
      \ ':': wilder#popupmenu_renderer({
      \       'highlighter': wilder#basic_highlighter(),
      \       'left': [
      \         wilder#popupmenu_devicons(),
      \         ],
      \       'right': [
      \         ' ',
      \         wilder#popupmenu_scrollbar(),
      \         ],
      \       }),
      \ '/': wilder#wildmenu_renderer({
      \       'highlighter': wilder#basic_highlighter(),
      \       }),
      \ '?': wilder#wildmenu_renderer({
      \       'highlighter': wilder#basic_highlighter(),
      \       }),
      \ }))

Screen recording:

record-2022-06-11_03.25.56.mp4

This problem goes away if I remove renderer for '/'.

@gelguy
Copy link
Owner

gelguy commented Jun 19, 2022

Thanks for the report!

I noticed this a few times but this issue helped me realise it specifically occurs when conceallevel is non-zero (which is the case for help files).

The related Neovim bug is neovim/neovim#17810.

@gelguy gelguy added bug Something isn't working neovim labels Jun 28, 2022
z0rc added a commit to z0rc/dotfiles that referenced this issue Dec 15, 2022
@Frederick888
Copy link
Author

I patched Neovim v0.9.5 with neovim/neovim#27947 however this issue still persisted.

Not sure if neovim/neovim#27947 actually relies on something else and I should try Neovim nightly instead.

I'll check it again when v0.10.0 is out.

@Frederick888
Copy link
Author

I'm using v0.10.0 now and unfortunately neovim/neovim#27947 didn't help.

(I'm actually experiencing more flickering now in general. Not sure if they are relevant.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working neovim
Projects
None yet
Development

No branches or pull requests

2 participants