-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
bug: Debug vim closes unexpectedly when using shortcuts #324
Comments
Please note that everything works perfectly when the first time I open Oil is not via a mapping: This scenario works without bugs:
|
Congratulations, you have found a crash in Neovim! I'll list out some options, in order of least to most effort.
This should give you some additional information when you hit the crash. |
Thanks @stevearc TIL how to run Neovim in debug mode. The nightly version of Neovim doesn't fix the problem unfortunately. I've built Neovim from source with debug symbols and came up with this: The problem comes from different Autocommands I have in my Neovim config : The first one is related with ale The second one is
The code causing this is : vim.api.nvim_create_autocmd("TextYankPost", {
group = num_au,
callback = function()
vim.highlight.on_yank({ higroup = "Visual", timeout = 120 }) # <= the failing line 26
end,
}) For a reason that I ignore, it doesn't find the module Removing Do you have an explanation of this behaviour ? |
Hmmm...how are you running the nvim that you built? Are you using GDB or running it directly? Also, the issues that you're seeing with ALE and
I think that the errors that you posted are unrelated to the original crash. We really need to find either a minimal configuration that repros the issue, or a stack trace from GDB. If running neovim that was built in debug mode doesn't produce the error, then it's possible that some difference in the compilation between debug and release modes changes the root cause. You can also try building in release mode with debug symbols to see if that will cause it to repro:
|
After you get the crash and you are back at the lldb prompt, try running The error in nightly is again because the VIMRUNTIME is not set to the nightly runtime dir |
Does it seem likely to you that this could be the issue? #221 (comment) |
No. I just did the following and had the bug still:
|
When you say "create a file", what steps are you actually taking? Is it:
Or is it some subset or different set of actions?
|
I updated oil and everything worked 🔥 |
Did you check the docs and existing issues?
Neovim version (nvim -v)
0.9.4
Operating system/version
MacOS 14.2.1
Describe the bug
When I open oil with the command
:Oil
everything works perfectlyBut, when it's open via a mapping (
-
or<C-f>
), as soon as I modify an oil window (or float) vim closes.Here is my config :
I see no logs related to this in
~/.cache/nvim/log
How can I debug such behaviors ?
What is the severity of this bug?
tolerable (can work around it)
Steps To Reproduce
The bug seems related to my config. It's not reproducible with a minimal
init.lua
Expected Behavior
Write logs somewhere to be able to debug weird behaviors
Directory structure
Same behavior for different projects
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: