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 SetCursorStyle command #742

Merged
merged 1 commit into from Jan 11, 2023
Merged

Conversation

TimonPost
Copy link
Member

Adds a command to set the cursor style.

Fixes: #646 , maybe #740

@Cl00e9ment
Copy link
Contributor

Cl00e9ment commented Jan 11, 2023

I was just about to create a pull request but you were faster!

I don't know if it's useful, but here is my version:
branch: https://github.com/Cl00e9ment/crossterm/tree/feat-set-cursor-style
diff: https://github.com/crossterm-rs/crossterm/compare/master...Cl00e9ment:crossterm:feat-set-cursor-style?expand=1

@TimonPost TimonPost merged commit 614e6a7 into master Jan 11, 2023
@TimonPost
Copy link
Member Author

TimonPost commented Jan 11, 2023

Oh whoops, just merged and your commented showed up. What a coincidence, im sorry :), let me look at that.

@TimonPost
Copy link
Member Author

TimonPost commented Jan 11, 2023

I decided to keep enable / disable blinking. Those are very specific and a user might not know which cursor shape it uses. Allowing to have this separately may allow a user to control blinking for the current active cursor

@TimonPost
Copy link
Member Author

If you want to follow up and improve there is time to do that! I will not release yet. I see I missed adding it to the commands list and your comment on why two ansi codes are used might be nice as well.

@Cl00e9ment
Copy link
Contributor

I decided to keep enable / disable blinking. Those are very specific and a user might not know which cursor shape it uses.

Yes but these commands are broken on certain terminals so a note should be added.

If you want to follow up and improve there is time to do that!

I'll do that!

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.

Add a function to get the cursor style (shape, blinking)
2 participants