1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-17 01:42:45 +02:00

more lint fixes

This commit is contained in:
Jesse Duffield
2021-04-05 12:45:27 +10:00
parent 5f46e1cdcd
commit f8282d6a58
3 changed files with 16 additions and 35 deletions

View File

@ -223,10 +223,12 @@ func Test() error {
err := createFixture(testPath, actualDir)
if err != nil {
// return err
return err
}
runLazygit(testPath, rootDir, record, speed)
if err := runLazygit(testPath, rootDir, record, speed); err != nil {
return err
}
if updateSnapshots {
err = oscommands.CopyDir(actualDir, expectedDir)
@ -431,5 +433,8 @@ func prepareIntegrationTestDir(actualDir string) {
}
func main() {
Test()
err := Test()
if err != nil {
panic(err)
}
}

View File

@ -557,14 +557,14 @@ func (gui *Gui) activateContext(c Context) error {
return nil
}
// currently unused
func (gui *Gui) renderContextStack() string {
result := ""
for _, context := range gui.State.ContextManager.ContextStack {
result += string(context.GetKey()) + "\n"
}
return result
}
// // currently unused
// func (gui *Gui) renderContextStack() string {
// result := ""
// for _, context := range gui.State.ContextManager.ContextStack {
// result += string(context.GetKey()) + "\n"
// }
// return result
// }
func (gui *Gui) currentContext() Context {
gui.State.ContextManager.Lock()

View File

@ -205,30 +205,6 @@ func (gui *Gui) handleMouseDrag() error {
})
}
func (gui *Gui) handleMouseScrollUp() error {
return gui.withLBLActiveCheck(func(state *lBlPanelState) error {
if gui.popupPanelFocused() {
return nil
}
state.SelectMode = LINE
return gui.LBLCycleLine(-1, state)
})
}
func (gui *Gui) handleMouseScrollDown() error {
return gui.withLBLActiveCheck(func(state *lBlPanelState) error {
if gui.popupPanelFocused() {
return nil
}
state.SelectMode = LINE
return gui.LBLCycleLine(1, state)
})
}
func (gui *Gui) getSelectedCommitFileName() string {
idx := gui.State.Panels.CommitFiles.SelectedLineIdx