summaryrefslogtreecommitdiffstats
path: root/pkg/gui/global_handlers.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-11-21 12:48:49 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-12-06 22:37:28 +1100
commit1996eddd9124709431ced14b1650ae5a50963be7 (patch)
tree021b88b94139b21beae4cae92b9f0a119e7361f2 /pkg/gui/global_handlers.go
parentde0e885c65c7d6505055af490e58c21aad59f67e (diff)
more efficient context diff size changing
Diffstat (limited to 'pkg/gui/global_handlers.go')
-rw-r--r--pkg/gui/global_handlers.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/global_handlers.go b/pkg/gui/global_handlers.go
index c104c1664..e0f05ca44 100644
--- a/pkg/gui/global_handlers.go
+++ b/pkg/gui/global_handlers.go
@@ -189,9 +189,9 @@ func (gui *Gui) handleMouseDownMain() error {
// set filename, set primary/secondary selected, set line number, then switch context
// I'll need to know it was changed though.
// Could I pass something along to the context change?
- return gui.enterFile(false, gui.Views.Main.SelectedLineIdx())
+ return gui.enterFile(OnFocusOpts{ClickedViewName: "main", ClickedViewLineIdx: gui.Views.Main.SelectedLineIdx()})
case gui.State.Contexts.CommitFiles:
- return gui.enterCommitFile(gui.Views.Main.SelectedLineIdx())
+ return gui.enterCommitFile(OnFocusOpts{ClickedViewName: "main", ClickedViewLineIdx: gui.Views.Main.SelectedLineIdx()})
}
return nil
@@ -204,7 +204,7 @@ func (gui *Gui) handleMouseDownSecondary() error {
switch gui.g.CurrentView() {
case gui.Views.Files:
- return gui.enterFile(true, gui.Views.Secondary.SelectedLineIdx())
+ return gui.enterFile(OnFocusOpts{ClickedViewName: "secondary", ClickedViewLineIdx: gui.Views.Secondary.SelectedLineIdx()})
}
return nil