Closed raaymax closed 4 months ago
I'm not able to reproduce this - <cr>
on a file works for me, and on a hunk going to the correct line.
having the same issue
Alright - I've added some logging where it runs the command to open the file: https://github.com/NeogitOrg/neogit/pull/1421
Update to latest master, run
NEOGIT_LOG_LEVEL=debug NEOGIT_LOG_FILE=true NEOGIT_DEBUG=true nvim
and find the command run with:
tail -n 1000 -f ~/.cache/nvim/neogit.log | grep 'Status - Open'
Lemme know if it looks weird.
Yeah, this behavior hasn't work for me reliably for like a month. Sometimes it works, sometimes not, but more failed than it's working.
FWIIW, neogit always give notification of the relevant line and just close itself.
NEOGIT_LOG_LEVEL=debug NEOGIT_LOG_FILE=true NEOGIT_DEBUG=true nvim
Just run a bunch open file from neogit
tail -n 1000 -f ~/.cache/nvim/neogit.log | rg 'Status - Open'
[D 0.30.83 ] buffers/status/actions.lua:63 [Status - Open] 'silent! edit /Users/.../gitconfig | 1 | norm! zz'
[D 0.80.42 ] buffers/status/actions.lua:63 [Status - Open] 'silent! edit /Users/.../nvim/lua/config/plugins/windows.lua | 2 | norm! zz'
[D 1.17.78 ] buffers/status/actions.lua:63 [Status - Open] 'silent! edit /Users/.../nvim/lua/config/ui.lua | 1 | norm! zz'
[D 1.72.25 ] buffers/status/actions.lua:63 [Status - Open] 'silent! edit /Users/.../nvim/lua/config/ui.lua | 24 | norm! zz'
[D 2.31.06 ] buffers/status/actions.lua:63 [Status - Open] 'silent! edit /Users/.../gitconfig | 78 | norm! zz'
If you were to run :lua vim.cmd('silent! edit /Users/.../gitconfig | 1 | norm! zz'
, what happens?
(presuming you sub your username back in, of course)
Ok I can see in the split second neogit opening the file in neogit window and closing that window. That's why.
Opening it manually from cmd work fine.
Edit: And I saw the buffer in the background buffer list, thus confirming neogit opening it in the wrong window
Alright, thats helpful.
I still can't reproduce this locally, but I schedule-wrapped the open command on master. Let me know if this has any impact.
I still can't reproduce this locally, but I schedule-wrapped the open command on master. Let me know if this has any impact.
Perfect, everything works as expected 👍🏽
Thank you
Glad to hear it! Thanks for reporting this.
Nice! Two days ago, I reported an issue. I checked back to see if anyone even responded to my report, and surprise, surprise, the bug is already fixed! Great job!🥇
Description
Go to file is not working
https://github.com/user-attachments/assets/0e70f57e-f11f-43bc-b1be-735466b72488
Neovim version
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1716656478
Operating system and version
macOS 14.5
Steps to reproduce
Expected behavior
neogit should open edited file
Actual behavior
neogit just closes it's window
Minimal config