mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
more refactoring
This commit is contained in:
@ -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())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user