1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-09 13:47:11 +02:00

don't panic

"panic: runtime error: index out of range"

when executing stash pop 'g' from help menu
This commit is contained in:
Dawid Dziurla 2018-09-01 14:17:45 +02:00
parent 90a4cada82
commit 20073d0293
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -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]
}