mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-13 00:07:59 +02:00
Replace CurrentPopupContexts() with Context().CurrentPopup()
This commit is contained in:
parent
3a8b97841f
commit
f30387e7f5
@ -325,7 +325,7 @@ func (self *ConfirmationHelper) getSelectedSuggestionValue() string {
|
|||||||
|
|
||||||
func (self *ConfirmationHelper) ResizeCurrentPopupPanels() {
|
func (self *ConfirmationHelper) ResizeCurrentPopupPanels() {
|
||||||
var parentPopupContext types.Context
|
var parentPopupContext types.Context
|
||||||
for _, c := range self.c.CurrentPopupContexts() {
|
for _, c := range self.c.Context().CurrentPopup() {
|
||||||
switch c {
|
switch c {
|
||||||
case self.c.Contexts().Menu:
|
case self.c.Contexts().Menu:
|
||||||
self.resizeMenu(parentPopupContext)
|
self.resizeMenu(parentPopupContext)
|
||||||
|
@ -45,10 +45,6 @@ func (self *guiCommon) RunSubprocess(cmdObj oscommands.ICmdObj) (bool, error) {
|
|||||||
return self.gui.runSubprocessWithSuspense(cmdObj)
|
return self.gui.runSubprocessWithSuspense(cmdObj)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *guiCommon) CurrentPopupContexts() []types.Context {
|
|
||||||
return self.gui.State.ContextMgr.CurrentPopup()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (self *guiCommon) IsCurrentContext(c types.Context) bool {
|
func (self *guiCommon) IsCurrentContext(c types.Context) bool {
|
||||||
return self.gui.State.ContextMgr.IsCurrent(c)
|
return self.gui.State.ContextMgr.IsCurrent(c)
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,6 @@ type IGuiCommon interface {
|
|||||||
RunSubprocess(cmdObj oscommands.ICmdObj) (bool, error)
|
RunSubprocess(cmdObj oscommands.ICmdObj) (bool, error)
|
||||||
RunSubprocessAndRefresh(oscommands.ICmdObj) error
|
RunSubprocessAndRefresh(oscommands.ICmdObj) error
|
||||||
|
|
||||||
CurrentPopupContexts() []Context
|
|
||||||
IsCurrentContext(Context) bool
|
IsCurrentContext(Context) bool
|
||||||
// TODO: replace the above context-based methods with just using Context() e.g. replace PushContext() with Context().Push()
|
// TODO: replace the above context-based methods with just using Context() e.g. replace PushContext() with Context().Push()
|
||||||
Context() IContextMgr
|
Context() IContextMgr
|
||||||
|
@ -282,6 +282,7 @@ type IContextMgr interface {
|
|||||||
Current() Context
|
Current() Context
|
||||||
CurrentStatic() Context
|
CurrentStatic() Context
|
||||||
CurrentSide() Context
|
CurrentSide() Context
|
||||||
|
CurrentPopup() []Context
|
||||||
IsCurrent(c Context) bool
|
IsCurrent(c Context) bool
|
||||||
ForEach(func(Context))
|
ForEach(func(Context))
|
||||||
AllList() []IListContext
|
AllList() []IListContext
|
||||||
|
Loading…
x
Reference in New Issue
Block a user