summaryrefslogtreecommitdiffstats
path: root/pkg/gui/patch_building_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-22 16:46:19 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit12bf851c7d595f077260be03c8e298646dd333ce (patch)
tree2efce3551a0e316c27008b62c3129ca729196847 /pkg/gui/patch_building_panel.go
parentc837c54c39d4e15af3f26df646f550436b35d505 (diff)
faster patch manager
Diffstat (limited to 'pkg/gui/patch_building_panel.go')
-rw-r--r--pkg/gui/patch_building_panel.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/gui/patch_building_panel.go b/pkg/gui/patch_building_panel.go
index d7be86857..fc39a2e43 100644
--- a/pkg/gui/patch_building_panel.go
+++ b/pkg/gui/patch_building_panel.go
@@ -49,7 +49,10 @@ func (gui *Gui) handleToggleSelectionForPatch(g *gocui.Gui, v *gocui.View) error
toggleFunc := gui.GitCommand.PatchManager.AddFileLineRange
filename := gui.getSelectedCommitFileName()
- includedLineIndices := gui.GitCommand.PatchManager.GetFileIncLineIndices(filename)
+ includedLineIndices, err := gui.GitCommand.PatchManager.GetFileIncLineIndices(filename)
+ if err != nil {
+ return err
+ }
currentLineIsStaged := utils.IncludesInt(includedLineIndices, state.SelectedLineIdx)
if currentLineIsStaged {
toggleFunc = gui.GitCommand.PatchManager.RemoveFileLineRange