Closed AThePeanut4 closed 3 months ago
Really appreciate the list. It's totally true than when you know how something is "supposed" to work, you just avoid doing the "wrong" things... 😅 Anyways, most of these are pretty straight forward, shouldn't be much work.
There aren't any arrows in the signcolumn anymore. It would be great to have these back, since they gave useful feedback especially to a new user as to what is expandable/collapsible.
When I updated things to use native folds, this kinda broke. Mostly because all diffs are lazy-loaded, so the fold doesn't exist (according to vim) until it's expanded for the first time.. I'm planning to bring it back, just haven't done it yet.
The "Head:", "Merge:" and "Push:" lines no longer include commit hashes. It would be nice to have these back as well, but if removing them was intentional then it's not a big deal. It just looks a bit weird without them now 😄
I never liked that, but I'm planning to make it an option you can configure. The new status buffer makes this pretty trivial, so I'll get to it soon :)
I didn't really "fix" the tab issue, but I overloaded j
and k
to "skip" the empty line between sections, so I think that kinda winds up solving the issue a different way.
I didn't really "fix" the tab issue, but I overloaded
j
andk
to "skip" the empty line between sections, so I think that kinda winds up solving the issue a different way.
Probably good enough for now, it was a fairly minor issue anyway. You can still get the cursor in the empty lines with the arrow keys, <C-U>
, mouse, etc. I might try and figure out a proper fix at some point myself. I have found a small bug here though - when the Recent Commits section is collapsed, pressing j
while the cursor is on the last line of the buffer (the Recent Commits header) now moves the cursor up by 1, rather than doing nothing.
I'm also unfortunately still seeing sections automatically close when returning from popups, although I think it only starts happening after I collapse a section from inside one the empty lines. I'm also seeing the cursor jump after returning from a popup - if the cursor was on the Hint/Head/Merge/Push lines, it jumps down to the Untracked files section.
Yeah, redrawing the buffer could be done a bit more cleverly, but I couldn't really crack it 😓
Internally it's a tree structure, the "root" has no parent node, but has child nodes, and those in-turn have child nodes, all the way down to the leaves, which are usually text of some kind, which have no children. I tried a few recursive approaches to diff the trees, tried some morphing algo's from the javascript world, and... never got anything to work. So, the current approach is to just render the new tree, and copy over just the fold state of foldable nodes.
Which is... close to right, but requires some other complexity to make up for it.
https://github.com/NeogitOrg/neogit/issues/1236#issuecomment-2046121658 @avegancafe
@CKolkey I am also getting what is probably the same issue: This happens with my normal config and when using a clean config (nothing but neogit).
Uncommenting the fillchars
line here, which was commented out in 8e489a04, fixes it:
https://github.com/NeogitOrg/neogit/blob/abbb35a48f47ebd786ef44174b080c61e7fb7cf0/lua/neogit/lib/buffer.lua#L704-L714
Should the lines that set signcolumn
not also be uncommented? If I uncomment them then the signcolumn decreases in width by 1, so that there is no longer a gap after the >
, but this is only because I set signcolumn=yes
in my config. In a clean config nothing changes (there is no gap either way). On that topic though, I have to say I don't like the removal of the gap after the >
(18938e2). I could just change the signs to add a space in my neogit config, but for consistency with before I think it would be a good idea to either revert that part of 18938e2 or change the default signs to include a space.
Great catch - I was messing with something else and accidentally committed that change... Anyways, its back 😅
As for the space there - I was totally on the fence about that one -- I'll put the space back, I like it too. Thanks for the feedback.
Yeah probably pretty similar @AThePeanut4 , I'm still seeing this on latest nightly, so lmk whenever I should pull and can test it out!
Firstly, thank you to everyone involved in making this plugin, and specifically thank you @CKolkey for all the fixes, new features and improvements you've made over the last year or so. It really makes working with Git a breeze, and without it I certainly would not have been able to fully switch over to Neovim.
Description
So this is a list of several small issues I've come across while (ab)using the rewritten status buffer. A few might also have existed before #1161. For brevity I'm just going to give short descriptions of each, if you're unable to reproduce any of them I'll be happy to provide more detailed steps.
Bugs:
<Tab>
in the blank space between expanded sections. Sometimes it will collapse the section above, and sometimes it will do nothing. I've also come across a likely related issue, see below for reproduction steps.x
) to multiple unstaged files at once (with Visual mode) throws an error.1
,2
,3
or4
when the cursor is in any blank line acts as if the cursor was in the "Recent commits" section.?
) while the cursor is on the "Hint:", "Head:", Merge:" or "Push:" lines throws an error.:Neogit
when Neogit is already open in another tabpage closes the current tabpage rather than switching to the previous Neogit tabpage.q
if it is the last open tabpage throws an error. It should probably open a blank file in this case, or the alternate file.attempt to compare nil with number ... in function 'get_cursor_location'
errors. These also seem to happen when returning to the status buffer from a popup, but it again doesn't happen every time.~ Seems to no longer be happening.:Neogit
(rather than opening Neogit with a keymap) prints the current directory to the console. Replacingvim.cmd.lcd(opts.cwd)
withvim.cmd.lcd({ args = { opts.cwd }, mods = { silent = true } })
fixes this, but perhaps this should be considered an Neovim bug? Nothing in:help :lcd
or:help :cd
implies that the new current directory should be printed. Also #1231.~ Both issues now fixed.Regressions (or perhaps intentional changes):
Reproduction steps for the
<Tab>
issue<Tab>
.<Tab>
.<Tab>
.Neovim version
NVIM v0.10.0-dev-2783+g381806729-Homebrew Build type: Release LuaJIT 2.1.1710088188
Operating system and version
macOS 14.4.1