diff options
author | Dawid Dziurla <dawidd0811@gmail.com> | 2018-09-01 14:17:45 +0200 |
---|---|---|
committer | Dawid Dziurla <dawidd0811@gmail.com> | 2018-09-03 17:54:06 +0200 |
commit | 20073d02939059c6ea4d7371f710448a50f0a7d5 (patch) | |
tree | 3d6d909ceefe928ba4237dfa50edf37e3378537d /pkg | |
parent | 90a4cada8228fee74694a66d97a40435ba4f2b1b (diff) |
don't panic
"panic: runtime error: index out of range"
when executing stash pop 'g' from help menu
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/gui/stash_panel.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/gui/stash_panel.go b/pkg/gui/stash_panel.go index 2c5e631cb..dd7ecfeb9 100644 --- a/pkg/gui/stash_panel.go +++ b/pkg/gui/stash_panel.go @@ -27,7 +27,8 @@ func (gui *Gui) getSelectedStashEntry(v *gocui.View) *commands.StashEntry { if len(gui.State.StashEntries) == 0 { return nil } - lineNumber := gui.getItemPosition(v) + stashView, _ := gui.g.View("stash") + lineNumber := gui.getItemPosition(stashView) return &gui.State.StashEntries[lineNumber] } |