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

ensure there is always a current context

This commit is contained in:
Jesse Duffield
2020-08-23 10:17:17 +10:00
parent ade54b38c1
commit 4198bbae6c
4 changed files with 5 additions and 16 deletions

View File

@ -31,7 +31,7 @@ func (gui *Gui) renderDiff() error {
// which becomes an option when you bring up the diff menu, but when you're just
// flicking through branches it will be using the local branch name.
func (gui *Gui) currentDiffTerminals() []string {
switch gui.currentContextKey() {
switch gui.currentContext().GetKey() {
case "":
return nil
case FILES_CONTEXT_KEY:
@ -71,7 +71,7 @@ func (gui *Gui) currentDiffTerminal() string {
}
func (gui *Gui) currentlySelectedFilename() string {
switch gui.currentContextKey() {
switch gui.currentContext().GetKey() {
case FILES_CONTEXT_KEY, COMMIT_FILES_CONTEXT_KEY:
return gui.getSideContextSelectedItemId()
default: