You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When git file operations are enabled, I get this error when I try to remove a file from within Oil:
Error executing luv callback:
...n/Downloads/test/.repro/plugins/oil.nvim/lua/oil/git.lua:54: E5560: Vimscript function must not be called in a lua loop callback
stack traceback:
[C]: in function 'jobstart'
...n/Downloads/test/.repro/plugins/oil.nvim/lua/oil/git.lua:54: in function 'rm'
.../test/.repro/plugins/oil.nvim/lua/oil/adapters/files.lua:559: in function <.../test/.repro/plugins/oil.nvim/lua/oil/adapters/files.lua:557>
After pressing ENTER, deletion gets stuck at this loading bar...
...and if I press "Cancel", then the file still gets deleted.
I took a look at "adapters/files.lua" and I see that the callback for git add is wrapped in vim.schedule_wrap, while the callback for git rm is not:
Did you check the docs and existing issues?
Neovim version (nvim -v)
0.10.1
Operating system/version
NixOS 24.11
Describe the bug
When git file operations are enabled, I get this error when I try to remove a file from within Oil:
After pressing ENTER, deletion gets stuck at this loading bar...
...and if I press "Cancel", then the file still gets deleted.
I took a look at "adapters/files.lua" and I see that the callback for
git add
is wrapped invim.schedule_wrap
, while the callback forgit rm
is not:oil.nvim/lua/oil/adapters/files.lua
Lines 555 to 564 in 1fe476d
If I manually add
vim.schedule_wrap
then this seems to fix the issue.Thanks in advance!
What is the severity of this bug?
minor (annoyance)
Steps To Reproduce
Expected Behavior
The file should be deleted without any error.
Directory structure
test/a.txt
Repro
Did you check the bug with a clean config?
nvim -u repro.lua
using the repro.lua file above.The text was updated successfully, but these errors were encountered: