1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-09-16 09:16:26 +02:00

Expose SelectedCommit to custom commands, deprecate Selected{Local,Reflog,Sub}Commit

SelectedCommit is context-dependent and points to SelectedLocalCommit,
SelectedReflogCommit, or SelectedSubCommit depending on which panel is active.

If none of these panels is active, it returns the selected local commit, which
is probably the most useful default (e.g. when defining custom commands for the
Files panel).
This commit is contained in:
Stefan Haller
2024-06-28 17:13:59 +02:00
parent 1cb29cea15
commit 22f0d9cdd3
6 changed files with 104 additions and 9 deletions

View File

@@ -284,6 +284,7 @@ type IContextMgr interface {
CurrentSide() Context
CurrentPopup() []Context
IsCurrent(c Context) bool
IsCurrentOrParent(c Context) bool
ForEach(func(Context))
AllList() []IListContext
AllFilterable() []IFilterableContext