hydra.nvim
hydra.nvim copied to clipboard
Error when switch buffer
When buffer switch got following error: It may be caused by hydra floating windows not exited properly. The hydra timer is still running but the hydra floating window is destroyed.
E5555: API call: Buffer is not 'modifiable'
Error detected while processing function <lambda>2371[1]..<SNR>97_render_lines_from_timer[7]..<SNR>97_render_lines[86]..<SNR>101_delete_all_lines:
line 1:
E5555: API call: Buffer is not 'modifiable'
Error detected while processing function <lambda>2457[1]..<SNR>97_render_lines_from_timer[7]..<SNR>97_render_lines[86]..<SNR>101_delete_all_lines:
Can't reproduce. Need more info.
If hydra exits correctly with keymaps, there will not be any errors. One way to reproduce
- create a hydra floatwindows
- use mouse to click the floating window
- enter some command in command line ( I have plugins e.g. wilder and cmp autocomplete enabled when entering command mode and will create a floating window)
- see errors.
Still can't reproduce. I don't use wilder, but with cmp the command line and buffer completion float windows work fine together with hydra hint window.
Can you make a video? Or share a minimal config to reproduce.
https://user-images.githubusercontent.com/1681295/175803574-c32a716b-3e64-4cf7-aa7c-f325944e9346.mp4
I think might be wilder.nvim
This is very strange. You wouldn't be able to select hint window. I use vim.api.nvim_open_win
with focusable = false
@ray-x I remember that there is a bug in bufdir.nvim due to read-only buffer: https://github.com/elihunter173/dirbuf.nvim/issues/45
Does restoring your neovim version before https://github.com/neovim/neovim/commit/0cf5cd1ac9c8ec31c1d2f1b1a6585153a45fc4e9 fix the issue for you? Not sure though about the exact semantics of what neovim considers as "nofile".
Otherwise, you need to provide a minimal config.
I updated to neovim latest and it still occurs.
I am not using dirbuf.nvim
But I using wilder.nvim
which may related to this. And the error is from here:
if a:state.api.need_timer()
let l:render_id = a:state.render_id
call timer_start(0, {-> s:render_lines_from_timer(l:render_id, a:state, a:ctx, a:result)}) <-- here
else
call s:render_lines(a:state, a:ctx, a:result)
https://github.com/gelguy/wilder.nvim/blob/addb378c2ae41d3d4fbd214ca525eb1f2b2855e5/autoload/wilder/renderer/popupmenu.vim#L187-L193
Not quite sure if this is related: https://github.com/gelguy/wilder.nvim/issues/140