charmbracelet / bubbles

TUI components for Bubble Tea 🫧
MIT License
5.56k stars 264 forks source link

fix(textinput): Placeholder No Longer Changes Width + Paste Calculation #451

Closed hopefulTex closed 10 months ago

hopefulTex commented 10 months ago

Previously, the placeholderView() function did not respect Width when it was set to a non-zero value. The textinput's width now stays the same irrelevant of the placeholder length. Pasting now trims to match the available space if length is greater than the charLimit.

maaslalani commented 10 months ago

Thank you so much @hopefulTex, just tested this out with various values for placeholder and width and it works great! Really appreciate the PR ❤️

maaslalani commented 10 months ago

Pasting now trims to match the available space if length is greater than the charLimit.

Great catch on this as well!