-
Notifications
You must be signed in to change notification settings - Fork 34
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
Neovim incsearch highlighting tracking issue #30
Comments
A workaround for the incsearch not working with wilder.nvim See gelguy/wilder.nvim#30
Changing mode doesn't work if you're using also scrollbar plugin (I'm using dstein64/nvim-scrollview and Neovim 0.5). If file fits to screen, search highlighting works as intended (there is no scrollbar). If file is large and scrollbar becomes visible, wilder will break Quickly way to test this out is to install |
The underlying root cause for the case with the scrollbar plugin is the same (neovim/neovim#14064) . An oversimplified explanation: when redrawing windows, highlights are invalidated in some cases. If the viewport does not change too much, the rendering doesn't invalidate the window so the highlights are kept. However, if the viewport changes too much, or if there is a floating window overlaying the window, the highlights are invalidated. Edit: I've found a workaround for the nvim-scrollview. Note that it has to rebind nnoremap / :call WilderStart()<CR>
function! WilderStart()
call wilder#start_from_normal_mode()
ScrollViewDisable
call feedkeys('/', 'n')
endfunction
autocmd CmdlineLeave * ScrollViewEnable |
I don't think this is related to nvim-scrollview. I encountered the same behavior, and am not using that plugin. b.t.w, I am using neovim nightly |
I updated the original issue just yesterday - the Unfortunately I don't have another workaround for this. |
10x. Added a confirmation on the nvim bug you opened. |
I bisected to the problematic commit in the issue mentioned above (neovim/neovim#14064). In general, Neovim/Vim doesn't like it when |
Then maybe the solution would be to update |
I've tried many workarounds, but none work so far. Fixing the code in Neovim seems to be the best option. |
I've found another workaround 😄. Could you help verify if the latest master fixes the issue? It should be fixed for all renderers and all Neovim versions. |
Yay 🎉 I'm using Neovim nightly and the issue seems to indeed be fixed. I've tested with both Thanks for fixing it! |
was being stupid... anyone who gets here pls ignore this comment...
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
" vim-plug
call plug#begin()
Plug 'gelguy/wilder.nvim'
call plug#end()
set incsearch
" 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#cmdline_pipeline(),
\ wilder#search_pipeline(),
\ ),
\ ])
if has('nvim')
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(),
\ }),
\ }))
else
call wilder#set_option('renderer', wilder#wildmenu_renderer({
\ 'highlighter': wilder#basic_highlighter(),
\ }))
endif
" vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=2 smarttab: |
Wait... I'm so sorry... I played around with the files locally and there were conflicts when git pull so my wilder.nvim wasn't really up-to-date (face palm...) Just updated and now the issue is gone. Thank you very much for the fix! |
#65 fixes the issue for me. |
incsearch
highlighting disappears or is sometimes wrongwilder#popupmenu_renderer()
when searchingwilder#popupmenu_renderer()
andwilder#wildmenu_renderer()
when searching and the current window view changes (e.g. moves due toincsearch
)See neovim/neovim#14064
See neovim/neovim#12495 (outdated)
A workaround is to use
wilder#wildmenu_renderer({'mode': 'statusline'})
for searching.Update: the
statusline
workaround doesn't work for Neovim 0.6 nightly.The text was updated successfully, but these errors were encountered: