Skip to content

fix(viewport): preempt potential panics when calculating visible lines#608

Open
meowgorithm wants to merge 1 commit intomasterfrom
viewport-panic-fix
Open

fix(viewport): preempt potential panics when calculating visible lines#608
meowgorithm wants to merge 1 commit intomasterfrom
viewport-panic-fix

Conversation

@meowgorithm
Copy link
Member

This adds some checks to prevent slice out-of-bounds errors when calculating visible lines in the viewport.

This will fix the panic we're seeing in charmbracelet/gum#660 (comment) (though we still need to address the zero-height-by-default thing).

@caarlos0
Copy link
Member

not sure if this is still needed

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.

3 participants