Comments (13)
I don't think this is related to nvim-scrollview. I encountered the same behavior, and am not using that plugin.
The problem usually arises when incsearch
is enabled and searching for something not in the current viewport.
As you can see in the attached screen grab, for some reason the search reverts back to the previous searched for item on each key stroke.
b.t.w, I am using neovim nightly
from wilder.nvim.
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.
from wilder.nvim.
Yay 🎉 I'm using Neovim nightly and the issue seems to indeed be fixed. I've tested with both wildmenu_renderer
and popupmenu_renderer
and in both cases the incsearch
highlight is stable 😄
Thanks for fixing it!
from wilder.nvim.
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!
from wilder.nvim.
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 incsearch
highlight.
Quickly way to test this out is to install scrollview
and wilder
, enable incsearch
and try with small and large file.
from wilder.nvim.
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 /
which may conflict with some other plugins.
nnoremap / :call WilderStart()<CR>
function! WilderStart()
call wilder#start_from_normal_mode()
ScrollViewDisable
call feedkeys('/', 'n')
endfunction
autocmd CmdlineLeave * ScrollViewEnable
from wilder.nvim.
I updated the original issue just yesterday - the statusline
workaround does not work for Neovim 0.6 nightly.
Unfortunately I don't have another workaround for this.
from wilder.nvim.
10x. Added a confirmation on the nvim bug you opened.
Any idea what is the cause?
from wilder.nvim.
I bisected to the problematic commit in the issue mentioned above (neovim/neovim#14064).
In general, Neovim/Vim doesn't like it when redraw
is called in the cmdline. The incsearch
highlighting is a "temporary" highlight, and it gets invalidated when redrawing in certain cases e.g. the viewport moves or there is a floating/popup window over the buffer.
from wilder.nvim.
Then maybe the solution would be to update incsearch
proactively after calling redraw
? or not call redraw
at all?
from wilder.nvim.
I've tried many workarounds, but none work so far. Fixing the code in Neovim seems to be the best option.
from wilder.nvim.
was being stupid... anyone who gets here pls ignore this comment...
Hate to be that guy but there's still a minor issue for me...
I'm using neovim 0.5.0 and when the first search hit is not in the view before starting searching, the highlights flicker sometimes:
The minimal vimrc I used:
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:
from wilder.nvim.
#65 fixes the issue for me.
10x
from wilder.nvim.
Related Issues (20)
- File finder: customizable behavior on should_use_file_finder HOT 1
- Changing the background color HOT 1
- Strange off-by-one error when hitting <Tab> in the command line HOT 3
- `_wilder_python_search` error when searching with `/` HOT 2
- Highlight the candidates
- Wilder removes topline in buffer in .10 nightly
- Wilder pop up breaks lualine "diff" component
- The popup menu's color is weird HOT 1
- I entered / in cmdline and received this error HOT 6
- Issue with wilder when trying to select commands(TAB) HOT 1
- Trying to install wilder correctly for NvChad, getting Unknown function _wilder_python_file_finder HOT 1
- Semshi/Wilder conflict HOT 6
- Configure to operate similarly to wildmode=list:longest?
- "error caught in async handler" when searching HOT 1
- Popupmenu_render only works on 1st table.
- Bug when trying to save harpoon buffer
- How to select the first listed item by default? HOT 5
- Unknown function: _wilder_python_search HOT 4
- When use_python_remote_plugin is set to 0, an error occurs when writing during a git commit.
- Nvim 0.9.5 still can not register wilder.nvim with UpdateRemotePlugins on Windows HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wilder.nvim.