diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-05 01:10:23 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | d627b3bfc829f4ccaad910bf6136eda8af183740 (patch) | |
tree | 98c06a2796e106148e61f7f49e4a3b770a8121a2 /pkg/gui/global_handlers.go | |
parent | 952c62df37f839004a80fa393f4ddb42683fc41f (diff) |
more refactoring
Diffstat (limited to 'pkg/gui/global_handlers.go')
-rw-r--r-- | pkg/gui/global_handlers.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/global_handlers.go b/pkg/gui/global_handlers.go index 25aafa588..0f281346b 100644 --- a/pkg/gui/global_handlers.go +++ b/pkg/gui/global_handlers.go @@ -148,13 +148,13 @@ func (gui *Gui) handleMouseDownMain() error { return nil } - switch gui.g.CurrentView().Name() { - case "files": + switch gui.g.CurrentView() { + case gui.Views.Files: // 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()) - case "commitFiles": + case gui.Views.CommitFiles: return gui.enterCommitFile(gui.Views.Main.SelectedLineIdx()) } @@ -166,8 +166,8 @@ func (gui *Gui) handleMouseDownSecondary() error { return nil } - switch gui.g.CurrentView().Name() { - case "files": + switch gui.g.CurrentView() { + case gui.Views.Files: return gui.enterFile(true, gui.Views.Secondary.SelectedLineIdx()) } |