Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(textinput): slicing outside cap #532

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MikaelFangel
Copy link
Contributor

@MikaelFangel MikaelFangel commented May 30, 2024

Fixes: #531
Fixes: charmbracelet/gum#591

Changes

  • Manually assigned p with the size of the Width + 1 because when you use var() to assign, the cap defaults to 32 and thus it is possible to get out of bounds errors.

@caarlos0 caarlos0 changed the title textinput: fix slicing outside cap fix(textinput): slicing outside cap Aug 13, 2024
@caarlos0 caarlos0 added the bug Something isn't working label Aug 13, 2024
Copy link
Member

@caarlos0 caarlos0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! can you add a test for it?

@MikaelFangel
Copy link
Contributor Author

Sure, I've added a test now that fails without the fix applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants