bubbles
bubbles copied to clipboard
textinput: API to programmatically move cursor
I'd like to be able to see the system cursor in my app.
Is it possible? Thanks.
I see in bubbles package for textinput cursor is “emulated”. It will be cool to have api to show cursor and move it position via commands.
This is a good idea. Transferring to Bubbles so we can track it.
We now have a public SetCursor method to programatically move the cursor.
ti := textinput.New()
ti.Value = "Blah blah..."
ti.SetCursor(4)
https://github.com/charmbracelet/bubbles/blob/a4ed54327f08e510ec54408c93c2a08285c727af/textinput/textinput.go#L149-L154