Compatibility with charmbracelet/bubbles v0.21.0
I'm new to Go, but I used a bunch of bubbletea/bubbles/etc. packages, and after some point I guess the packages either got updated (with go get) or github.com/charmbracelet/bubbles/filepicker was added not from the start. Either way, having this in go.mod:
module main
go 1.24.0
require (
github.com/charmbracelet/bubbles v0.21.0
github.com/erikgeiser/promptkit v0.9.0
)
and this in main.go
package main
import "github.com/erikgeiser/promptkit/textinput"
func main() {
input := textinput.New("Prompt:")
input.Placeholder = "placeholder"
_, _ = input.RunPrompt()
}
Makes the placeholder grab only the first grapheme cluster from the provided string, while in v0.20.0 it still shows the whole string.
The only related entry I found in https://github.com/charmbracelet/bubbles/releases/tag/v0.21.0 is
- https://github.com/charmbracelet/bubbles/commit/8b55efb2944ed8eb81df685f8dcfabbbf8897698: fix(textarea): placeholder with chinese chars (https://github.com/charmbracelet/bubbles/pull/767) (@caarlos0)
But at least with simple strings like 💚💚 and 你好 it correctly prints the first one, so not sure what changed with Chinese there.
Also, just noticed that last commit was 2 years ago, is this package being maintained?