Skip to content

Fix auto-surround closes with an open character#147187

Merged
alexdima merged 7 commits intomicrosoft:mainfrom
yamachig:main
Oct 24, 2022
Merged

Fix auto-surround closes with an open character#147187
alexdima merged 7 commits intomicrosoft:mainfrom
yamachig:main

Conversation

@yamachig
Copy link
Contributor

@yamachig yamachig commented Apr 10, 2022

Fixes #163115

This PR fixes an issue that the auto surround function incorrectly closes with an opening character (e.g. ().
This issue happens when using an IME, and I confirmed reproduction in Windows and Web. (VSCode version 1.66.1)
The issue seemed to be caused by passing an opening character to the parameter _charAfter of the CompositionSurroundSelectionCommand constructor.

Before the fix: closes with (
Before the fix

After the fix: closes with )
After the fix

Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

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

Thank you!

@alexdima alexdima enabled auto-merge (squash) October 24, 2022 18:09
@alexdima alexdima merged commit ce6aa98 into microsoft:main Oct 24, 2022
@alexdima alexdima added this to the October 2022 milestone Oct 24, 2022
formigoni pushed a commit to formigoni/vscode that referenced this pull request Oct 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

surroundingPairs in composition mode insert open character twice

4 participants