Skip to content

fix: handle when there's only one tabpages #1764

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phanen
Copy link
Contributor

@phanen phanen commented Jun 11, 2025

When there's only one neogit tabpage, type q then do motion cause error:

nvim --headless +Neogit +'sil! tabo | sil! only' --cmd 'lua vim.defer_fn(function() vim.api.nvim_input("qj") end, 1000)'
E5108: Error executing lua: .../neogit/lua/neogit/buffers/status/actions.lua:470: attempt to index field 'buffer' (a nil value)
stack traceback:
               .../neogit/lua/neogit/buffers/status/actions.lua:470: in function 'cb'
               .../neogit/lua/neogit/lib/buffer.lua:745: in function </home/phan/lazy/neogit/lua/neogit/lib/buffer.lua:744>

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

Successfully merging this pull request may close these issues.

1 participant