add option for persistent recent section#1688
add option for persistent recent section#1688laughingman-hass wants to merge 8 commits intoNeogitOrg:masterfrom
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
truewill always show the recent section. which looks like this