1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

fix up patch manager

This commit is contained in:
Jesse Duffield
2020-08-23 11:23:32 +10:00
parent 5cdfd41dca
commit bd66162972
3 changed files with 21 additions and 12 deletions

View File

@ -343,6 +343,21 @@ func (gui *Gui) viewTabContextMap() map[string][]tabContext {
}
}
func (gui *Gui) currentContextKeyIgnoringPopups() string {
stack := gui.State.ContextStack
for i := range stack {
reversedIndex := len(stack) - 1 - i
context := stack[reversedIndex]
kind := stack[reversedIndex].GetKind()
if kind != TEMPORARY_POPUP && kind != PERSISTENT_POPUP {
return context.GetKey()
}
}
return ""
}
func (gui *Gui) switchContext(c Context) error {
gui.g.Update(func(*gocui.Gui) error {
// push onto stack