The Wayback Machine - https://web.archive.org/web/20200705180109/https://github.com/github/VisualStudio/pull/2512
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

Prevent error when filenames have braces in them #2512

Merged
merged 3 commits into from Jun 9, 2020

Conversation

@davidwengier
Copy link
Contributor

davidwengier commented May 7, 2020

Fixes #2510

As per the documentation the OpenComparisonWindow2 method passes captions and tooltips through string.Format so braces break it.

The caption, tooltip, and label parameters use C#-style string formatting where {0} corresponds to the name of the left file and {1} corresponds to the name of the right file.

The existing captions have more detail than using the inbuilt {0} and {1} can provide, particularly as temporary files are used, so there is no option but to escape the braces. I reasoned that since this code is trigger from a UI gesture by the user the perf wasn't super critical so am just doing some lazy replaces. Let me know if thats an issue.

davidwengier and others added 2 commits May 7, 2020
@jcansdale
Copy link
Collaborator

jcansdale commented May 19, 2020

Hey @michael-hawker 👋 Have you had a chance to try this build? 😄

@jcansdale
Copy link
Collaborator

jcansdale commented Jun 9, 2020

Confirmed fix!

image

Thanks @davidwengier 🙏

Copy link
Collaborator

jcansdale left a comment

This looks great, thanks for the fix! 😄

@jcansdale jcansdale merged commit bb629da into github:master Jun 9, 2020
2 checks passed
2 checks passed
build
Details
github.VisualStudio #2.11.104+da661245ba succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.