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

Make sure to update the selection pivot while circling #14636

Merged
2 commits merged into from
Jan 16, 2023
Merged

Conversation

zadjii-msft
Copy link
Member

This builds upon #10749. When we added a separate pivot to track the "active" anchor, we forgot to update the pivot while circling. What does that mean? Moving the mouse would trigger us to update the selection using new endpoint and the old pivot, which hadn't been updated.

There's probably a more elegant way of doing this, but it's good enough.

Updated the test to cover this as well.

Closes #14462

@ghost ghost added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal. labels Jan 5, 2023
@github-actions

This comment has been minimized.

@zadjii-msft zadjii-msft added this to the Terminal v1.17 milestone Jan 10, 2023
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.

@carlos-zamora carlos-zamora added the Needs-Second It's a PR that needs another sign-off label Jan 10, 2023
@ghost ghost requested review from PankajBhojwani, DHowett and lhecker January 10, 2023 22:56
Comment on lines +1205 to +1206
//
// Failure to do this might lead to GH #14462
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
//
// Failure to do this might lead to GH #14462

I respect that this is true, but also... git blame could probably tell you that, and I don't know that every time we make a change we need to decorate the code with signposts that say "this was a bug back when xyz" :)

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry missed this - FWIW I still add these out of habit. After being through 4 different source control trees, I find it's 1000% easier to leave the history for weird lines of code next to them in the source. Then, when one of these lines is inevitably refactored, we can see the comment moved/deleted and check the original bug for regressions, rather than manually git blameing every time we think a line of code comes from a weird bug report.

That's my 2c. LOC are cheap.

Comment on lines +889 to +891
Log::Comment(fmt::format(L"expectedAnchor:({},{})", expectedAnchor.x, expectedAnchor.y).c_str());
Log::Comment(fmt::format(L"anchor:({},{})", anchor.x, anchor.y).c_str());
Log::Comment(fmt::format(L"end:({},{})", end.x, end.y).c_str());
Copy link
Member

Choose a reason for hiding this comment

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

this seems like it should be one really long fmt::format instead of three, but.. \_(shrug)_/

@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 16, 2023
@ghost
Copy link

ghost commented Jan 16, 2023

Hello @zadjii-msft!

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 dd2736f into main Jan 16, 2023
@ghost ghost deleted the dev/migrie/b/14462-real branch January 16, 2023 16:13
@ghost ghost removed the Needs-Second It's a PR that needs another sign-off label Jan 16, 2023
@ghost
Copy link

ghost commented Jan 24, 2023

🎉Windows Terminal Preview v1.17.1023 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-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 Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to select text correctly while new lines are printed and history buffer is full
3 participants