charmbracelet / charmbracelet/bubbles
textinput v2: 0 Width breaks placeholders
- Dominant language
- Go
- Stars
- 8.9k
- Forks
- 457
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 5
Description
**Describe the bug**
When creating a textinput model with a Width = 0 & a placeholder, only the first character of the placeholder works
**Setup**
Please complete the following information along with version numbers, if applicable.
- OS Arch
- Shell zsh
- Terminal Emulator kitty
- Terminal Multiplexer n/a
**To Reproduce**
Steps to reproduce the behavior:
1. `ti := textinput.New()
2. `ti.SetWidth(0)`
3. `ti.Placeholder = "Something"`
4. `ti.View()`
5. Placeholder will only have 1 char
**Source Code**
n/a
**Expected behavior**
The full placeholder to be visible, as per this commnent
"if there is no width, the placeholder can be any length"
**Screenshots**
Real:
Expected:
Contributor guide
Assessment
This issue has not been assessed yet.