diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-09 11:34:10 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-09 12:23:13 +1100 |
commit | e47ad846c4b6100aaff7013a3516d329bde19194 (patch) | |
tree | ead7f3f0a911d7ee4f4f46640c2bf449a74e8e05 /pkg/gui/patch_building_panel.go | |
parent | 8f68ac21293f1a0476802974817d9f87875f8743 (diff) |
big golangci-lint cleanup
Diffstat (limited to 'pkg/gui/patch_building_panel.go')
-rw-r--r-- | pkg/gui/patch_building_panel.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/gui/patch_building_panel.go b/pkg/gui/patch_building_panel.go index f4e2eea1d..17f7ad2cb 100644 --- a/pkg/gui/patch_building_panel.go +++ b/pkg/gui/patch_building_panel.go @@ -18,7 +18,8 @@ func (gui *Gui) refreshPatchBuildingPanel(selectedLineIdx int) error { // get diff from commit file that's currently selected commitFile := gui.getSelectedCommitFile(gui.g) if commitFile == nil { - return gui.renderString(gui.g, "commitFiles", gui.Tr.SLocalize("NoCommiteFiles")) + gui.renderString(gui.g, "commitFiles", gui.Tr.SLocalize("NoCommiteFiles")) + return nil } diff, err := gui.GitCommand.ShowCommitFile(commitFile.Sha, commitFile.Name, true) @@ -57,7 +58,8 @@ func (gui *Gui) handleToggleSelectionForPatch(g *gocui.Gui, v *gocui.View) error // add range of lines to those set for the file commitFile := gui.getSelectedCommitFile(gui.g) if commitFile == nil { - return gui.renderString(gui.g, "commitFiles", gui.Tr.SLocalize("NoCommiteFiles")) + gui.renderString(gui.g, "commitFiles", gui.Tr.SLocalize("NoCommiteFiles")) + return nil } toggleFunc(commitFile.Name, state.FirstLineIdx, state.LastLineIdx) @@ -92,7 +94,8 @@ func (gui *Gui) refreshSecondaryPatchPanel() error { secondaryView.Wrap = false gui.g.Update(func(*gocui.Gui) error { - return gui.setViewContent(gui.g, gui.getSecondaryView(), gui.GitCommand.PatchManager.RenderAggregatedPatchColored(false)) + gui.setViewContent(gui.g, gui.getSecondaryView(), gui.GitCommand.PatchManager.RenderAggregatedPatchColored(false)) + return nil }) } else { gui.State.SplitMainPanel = false |