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

Redraw TSFInputControl when Terminal cursor updates #5135

Merged
10 commits merged into from
Mar 30, 2020
Merged

Conversation

leonMSFT
Copy link
Contributor

Summary of the Pull Request

This PR will allow TSFInputControl to redraw its Canvas and TextBlock in response to when the Terminal cursor position updates. This will fix the issue where during Korean composition, the first symbol of the next composition will appear on top of the previous composed character. Since the Terminal Cursor updates a lot, I've added some checks to see if the TSFInputControl really needs to redraw. This will also decrease the number of actual redraws since we receive a bunch of LayoutRequested events when there's no difference between them.

PR Checklist

Validation Steps Performed

Startup, teardown, CJK IME gibberish testing, making sure the IME block shows up in the right place.

@zadjii-msft zadjii-msft added the Product-Terminal The new Windows Terminal. label Mar 27, 2020
Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

Checks out to me

void _RedrawCanvas();
bool _focused;

COORD _currentTerminalCursorPos;
Copy link
Member

Choose a reason for hiding this comment

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

should probably be a til::point nowadays

@zadjii-msft zadjii-msft added Area-Input Related to input processing (key presses, mouse, etc.) Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) labels Mar 27, 2020
Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

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

Nothing worth blocking over but I am curious about the nits mentioned. I would like til::point to be used if possible :) it's cool.

Also, I might use this for accessibility. It would make the cursor events waaaay less noisy.

src/cascadia/TerminalControl/TermControl.cpp Show resolved Hide resolved
@leonMSFT leonMSFT added the AutoMerge Marked for automatic merge by the bot when requirements are met label Mar 30, 2020
@ghost
Copy link

ghost commented Mar 30, 2020

Hello @leonMSFT!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit ca6b54e into master Mar 30, 2020
@ghost ghost deleted the dev/lelian/imeisme branch March 30, 2020 23:21
@ghost
Copy link

ghost commented Apr 22, 2020

🎉Windows Terminal Preview v0.11.1121.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) AutoMerge Marked for automatic merge by the bot when requirements are met Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Character Overlap during Korean IME Composition
4 participants