[Beginner question] Is there a way to control the position of the caret/cursor? #1531
Replies: 2 comments 1 reply
|
In v1, not really: the renderer owns the terminal cursor and restores it after each draw, which is why it snaps back. If you need the real terminal caret at a specific cell, the clean answer is Bubble Tea v2. In v2 you can set the cursor from the view ( If you stay on v1, the usual workaround is to use the bubbles virtual cursor / textarea rather than trying to manage the terminal cursor directly. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I want to use the real caret instead of the bubbles/cursor, which I've tried to accomplish using the termenv package with no success. The cursor does get moved but instantly returns to the bottom left of the console window. I've taken a look at the source code of bubbletea and noticed that it puts the cursor there on purpose but I still don't know how I could get around that.
Note that in cases where the View method gets called but doesn't re-render anything, the cursor actually moves and behaves how it should, but that is pretty much an edge case.
All reactions