summaryrefslogtreecommitdiffstats
path: root/pkg/gui/main_panels.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-02-05 16:56:36 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit145c69d9ae32ec8fbdd6d1e6116efec466a0a709 (patch)
treeb5f3e33943c739a6aee6d04b9a90fb6f1f363502 /pkg/gui/main_panels.go
parent482bdc4f1ea5448c5e98697ae66221e544ea40dd (diff)
working again
Diffstat (limited to 'pkg/gui/main_panels.go')
-rw-r--r--pkg/gui/main_panels.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/gui/main_panels.go b/pkg/gui/main_panels.go
index bb0644585..cbb478446 100644
--- a/pkg/gui/main_panels.go
+++ b/pkg/gui/main_panels.go
@@ -4,6 +4,7 @@ import (
"os/exec"
"github.com/jesseduffield/gocui"
+ "github.com/jesseduffield/lazygit/pkg/gui/types"
)
type viewUpdateOpts struct {
@@ -16,6 +17,8 @@ type viewUpdateOpts struct {
highlight bool
task updateTask
+
+ context types.Context
}
type refreshMainOpts struct {
@@ -100,6 +103,11 @@ func (gui *Gui) refreshMainView(opts *viewUpdateOpts, view *gocui.View) error {
view.Title = opts.title
view.Wrap = !opts.noWrap
view.Highlight = opts.highlight
+ context := opts.context
+ if context == nil {
+ context = gui.State.Contexts.Normal
+ }
+ gui.ViewContextMapSet(view.Name(), context)
if err := gui.runTaskForView(view, opts.task); err != nil {
gui.c.Log.Error(err)