Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to change cursor shape on exit of ScreenInteractive loop #953

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dangooddd
Copy link

Currently there is no option to set cursor_reset_shape_ on ScreenInteractive class. Because of that, cursor is always block and blinks (cursor shape is always 1).

This PR adds SetCursorReset method as option.

Will close #904

@ArthurSonzogni
Copy link
Owner

Thanks!

I don't think it works. FTXUI request the terminal to reflect what is the current cursor here (1), save it here (2), and restores it here (3)

I believe the value set by this new API would be overriden by (2), doesn't it?

Why do you need this API? Are you suggesting the current way of requesting/restoring the cursor value doesn't work?

@dangooddd
Copy link
Author

Sorry, i just had not seen https://github.com/ArthurSonzogni/FTXUI/blob/main/src/ftxui/component/screen_interactive.cpp#L604. Indeed, restoring cursor this way will be better than set this manually with New API.

Problem is that in my case ftxui always sets blinking cursor no matter what i do. I will try to debug this and describe the problem latter. Also in #904 I guess problem exactly like i have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changes cursor in underlying terminal
2 participants