mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Use static context
This commit is contained in:
committed by
Jesse Duffield
parent
23285eab40
commit
39c8577074
@ -394,15 +394,8 @@ func (gui *Gui) pageDelta(view *gocui.View) int {
|
||||
}
|
||||
|
||||
func getTabbedView(gui *Gui) *gocui.View {
|
||||
v := gui.g.CurrentView()
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
// if the action is invoked via the Options menu,
|
||||
// we need to execute it against the parent view
|
||||
if v.Name() == "menu" {
|
||||
v = v.ParentView
|
||||
}
|
||||
|
||||
return v
|
||||
// It safe assumption that only static contexts have tabs
|
||||
context := gui.currentStaticContext()
|
||||
view, _ := gui.g.View(context.GetViewName())
|
||||
return view
|
||||
}
|
||||
|
Reference in New Issue
Block a user