diff options
Diffstat (limited to 'pkg/gui/controllers/commits_files_controller.go')
-rw-r--r-- | pkg/gui/controllers/commits_files_controller.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/controllers/commits_files_controller.go b/pkg/gui/controllers/commits_files_controller.go index 5beecba02..f11005cd4 100644 --- a/pkg/gui/controllers/commits_files_controller.go +++ b/pkg/gui/controllers/commits_files_controller.go @@ -75,10 +75,10 @@ func (self *CommitFilesController) GetKeybindings(opts types.KeybindingsOpts) [] func (self *CommitFilesController) GetMouseKeybindings(opts types.KeybindingsOpts) []*gocui.ViewMouseBinding { return []*gocui.ViewMouseBinding{ { - ViewName: "main", + ViewName: "patchBuilding", Key: gocui.MouseLeft, Handler: self.onClickMain, - FromContext: string(self.context().GetKey()), + FocusedView: self.context().GetViewName(), }, } } @@ -107,7 +107,7 @@ func (self *CommitFilesController) onClickMain(opts gocui.ViewMouseBindingOpts) if node == nil { return nil } - return self.enterCommitFile(node, types.OnFocusOpts{ClickedViewName: "main", ClickedViewLineIdx: opts.Y}) + return self.enterCommitFile(node, types.OnFocusOpts{ClickedWindowName: "main", ClickedViewLineIdx: opts.Y}) } func (self *CommitFilesController) checkout(node *filetree.CommitFileNode) error { @@ -220,7 +220,7 @@ func (self *CommitFilesController) startPatchManager() error { } func (self *CommitFilesController) enter(node *filetree.CommitFileNode) error { - return self.enterCommitFile(node, types.OnFocusOpts{ClickedViewName: "", ClickedViewLineIdx: -1}) + return self.enterCommitFile(node, types.OnFocusOpts{ClickedWindowName: "", ClickedViewLineIdx: -1}) } func (self *CommitFilesController) enterCommitFile(node *filetree.CommitFileNode, opts types.OnFocusOpts) error { @@ -235,7 +235,7 @@ func (self *CommitFilesController) enterCommitFile(node *filetree.CommitFileNode } } - return self.c.PushContext(self.contexts.PatchBuilding, opts) + return self.c.PushContext(self.contexts.CustomPatchBuilder, opts) } if self.git.Patch.PatchManager.Active() && self.git.Patch.PatchManager.To != self.context().GetRef().RefName() { |