Skip to content

Update unfocused cursor to match current cursor style#2455

Merged
Tyriar merged 3 commits intoxtermjs:masterfrom
JeffreyCA:unfocused-cursor-style
Oct 8, 2019
Merged

Update unfocused cursor to match current cursor style#2455
Tyriar merged 3 commits intoxtermjs:masterfrom
JeffreyCA:unfocused-cursor-style

Conversation

@JeffreyCA
Copy link
Copy Markdown
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
Copy Markdown

shiqimei commented Oct 8, 2019

Thanks for your hardworking!

Copy link
Copy Markdown
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