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

Update unfocused cursor to match current cursor style #2455

Merged
merged 3 commits into from
Oct 8, 2019
Merged

Update unfocused cursor to match current cursor style #2455

merged 3 commits into from
Oct 8, 2019

Conversation

JeffreyCA
Copy link
Contributor

Fixes #2356.

Block cursor (unchanged)

When terminal is unfocused, it shows a outline of the block cursor.

Underline and bar cursors

When terminal is unfocused, it shows the underline or bar cursor. It always showed the outlined block cursor prior to this change.

Additional Change

This change revealed an unintended behaviour where if blinking is enabled and terminal is not focused, changing the cursor style did not update screen's cursor. A second change was made to force a refresh after options have changed regardless of whether blinking is enabled.

Tests

I tested unfocusing the terminal with all three styles and all three renderers (DOM, Canvas, WebGL) and verified proper cursor behaviour.

@shiqimei
Copy link

shiqimei commented Oct 8, 2019

Thanks for your hardworking!

Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@Tyriar Tyriar added this to the 4.2.0 milestone Oct 8, 2019
@Tyriar Tyriar merged commit 8288a26 into xtermjs:master Oct 8, 2019
@JeffreyCA JeffreyCA deleted the unfocused-cursor-style branch October 9, 2019 04:38
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.

When not focused the cursor should match the style of the terminal
3 participants