-
-
Notifications
You must be signed in to change notification settings - Fork 295
add option for persistent recent section #1688
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
base: master
Are you sure you want to change the base?
Conversation
additionally tidied up on the logic for show_recent
I didn't find a documentation section, where I could provide additional context for the option or the current behavior. Happy to add this, if you can point me to somewhere. |
@SheffeyG thats interesting. I'm currently away and will have a look if there is a nice way to fix this when i'm back. Personally i didn't like the same commit showing up in recent and unmerged, maybe there is a way to just show new commits in unmerged and recent to show previous commits. |
So... I think I made a pretty core assumption that an object's OID would only be in a given buffer once: neogit/lua/neogit/lib/ui/renderer.lua Lines 54 to 56 in df08cb9
That index is used to apply the "active item" highlight. neogit/lua/neogit/lib/buffer.lua Line 896 in df08cb9
And given that it's a hash-like lua table, last entry for a given OID wins. This is what @SheffeyG was pointing out, and... I don't think there's an easy fix. @laughingman-hass You could in theory XOR the "unmerged" and "recent" commits, but both are fetched concurrently when we re-sync internal state to repo state, so you'd need to have some kind of callback that operates on both tables after they are updated. Kind of a PITA if you ask me. |
fixes #1687
This PR adds a new option
config.sections.recent.always
, which defaults tofalse
. This keeps the current behavior which only shows the recent section if there is no unmerged commits. which looks like thisSetting this option to
true
will always show the recent section. which looks like this