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

more refactoring

This commit is contained in:
Jesse Duffield
2021-04-05 01:10:23 +10:00
parent 952c62df37
commit d627b3bfc8
7 changed files with 203 additions and 204 deletions

View File

@ -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())
}