diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go index e5b5c046646..c817f244652 100644 --- a/vendor/github.com/jesseduffield/gocui/view.go +++ b/vendor/github.com/jesseduffield/gocui/view.go @@ -1896,6 +1896,14 @@ func (v *View) onMouseMove(x int, y int) { } func (v *View) findHyperlinkAt(x, y int) *SearchPosition { + // Bounds check to prevent index out of range panic + if y < 0 || y >= len(v.viewLines) { + return nil + } + if x < 0 || x >= len(v.viewLines[y].line) { + return nil + } + linkStr := v.viewLines[y].line[x].hyperlink if linkStr == "" { return nil