mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-26 16:03:10 +03:00
more lint fixes
This commit is contained in:
@@ -223,10 +223,12 @@ func Test() error {
|
|||||||
|
|
||||||
err := createFixture(testPath, actualDir)
|
err := createFixture(testPath, actualDir)
|
||||||
if err != nil {
|
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 {
|
if updateSnapshots {
|
||||||
err = oscommands.CopyDir(actualDir, expectedDir)
|
err = oscommands.CopyDir(actualDir, expectedDir)
|
||||||
@@ -431,5 +433,8 @@ func prepareIntegrationTestDir(actualDir string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
Test()
|
err := Test()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -557,14 +557,14 @@ func (gui *Gui) activateContext(c Context) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// currently unused
|
// // currently unused
|
||||||
func (gui *Gui) renderContextStack() string {
|
// func (gui *Gui) renderContextStack() string {
|
||||||
result := ""
|
// result := ""
|
||||||
for _, context := range gui.State.ContextManager.ContextStack {
|
// for _, context := range gui.State.ContextManager.ContextStack {
|
||||||
result += string(context.GetKey()) + "\n"
|
// result += string(context.GetKey()) + "\n"
|
||||||
}
|
// }
|
||||||
return result
|
// return result
|
||||||
}
|
// }
|
||||||
|
|
||||||
func (gui *Gui) currentContext() Context {
|
func (gui *Gui) currentContext() Context {
|
||||||
gui.State.ContextManager.Lock()
|
gui.State.ContextManager.Lock()
|
||||||
|
|||||||
@@ -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 {
|
func (gui *Gui) getSelectedCommitFileName() string {
|
||||||
idx := gui.State.Panels.CommitFiles.SelectedLineIdx
|
idx := gui.State.Panels.CommitFiles.SelectedLineIdx
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user