Skip to content

Conversation

@majiayu000
Copy link

Fixes #5148

Changes

  • Add bounds checking in findHyperlinkAt() to prevent panic when viewLines changes between caller's bounds check and access
  • Return nil safely when x or y indices are out of range

Add defensive bounds checking in findHyperlinkAt() to prevent
"runtime error: index out of range [0] with length 0" panic.
This handles race conditions where viewLines may change between
the caller's bounds check and the function's access.

Fixes jesseduffield#5148

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: majiayu000 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: runtime error: index out of range [0] with length 0

1 participant