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

Failure to delete Lualine autocmds #97

Closed
bjjblackbelt opened this issue Apr 30, 2023 · 2 comments
Closed

Failure to delete Lualine autocmds #97

bjjblackbelt opened this issue Apr 30, 2023 · 2 comments

Comments

@bjjblackbelt
Copy link

When opening a file as a split from a floating window, I received the following error:

Error executing vim.schedule lua callback: ~/.local/share/nvim/lazy/oil.nvim/lua/oil/init.lua:292: Failed to delete autocmd
stack traceback:
[C]: in function 'nvim_del_autocmd'
~/.local/share/nvim/lazy/oil.nvim/lua/oil/init.lua:292: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>

Out of my ~80 plugins, I tracked the issue down to Lualine. I am unfamiliar with Neovim or Lua development and therefore cannot say if this bug should be added to the Lualine repo instead of here. However, I believe the open_float() function can be made more robust with the following change at line #291 in lua/oil/init.lua:

From: vim.api.nvim_del_autocmd(id)
To: pcall(vim.api.nvim_del_autocmd, id)

I'll create a pull-request if I get the time, but I figure someone else may be more qualified to make this change.

@stevearc
Copy link
Owner

stevearc commented May 2, 2023

Should be fixed now

@stevearc stevearc closed this as completed May 2, 2023
@bjjblackbelt
Copy link
Author

Works on my end. Many thanks! Great plugin. So happy I found it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants