mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
fix pop for menu
This commit is contained in:
parent
8a1c705918
commit
965d0b1cc4
1 changed files with 5 additions and 1 deletions
|
|
@ -125,7 +125,10 @@ func (gui *Gui) pushPreviousView(name string) {
|
|||
}
|
||||
|
||||
func (gui *Gui) returnFocus(g *gocui.Gui, v *gocui.View) error {
|
||||
previousViewName := gui.popPreviousView()
|
||||
previousViewName := gui.peekPreviousView()
|
||||
if g.CurrentView() != nil && !gui.isPopupPanel(g.CurrentView().Name()) {
|
||||
gui.popPreviousView()
|
||||
}
|
||||
previousView, err := g.View(previousViewName)
|
||||
if err != nil {
|
||||
// always fall back to services view if there's no 'previous' view stored
|
||||
|
|
@ -143,6 +146,7 @@ func (gui *Gui) switchFocus(g *gocui.Gui, oldView, newView *gocui.View, returnin
|
|||
// we assume we'll never want to return focus to a popup panel i.e.
|
||||
// we should never stack popup panels
|
||||
if oldView != nil && !gui.isPopupPanel(oldView.Name()) && !returning {
|
||||
gui.popPreviousView()
|
||||
gui.pushPreviousView(oldView.Name())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue