Skip to content

Add #ifdef and #ifndef as brackets#161192

Closed
RedCMD wants to merge 5 commits intomicrosoft:mainfrom
RedCMD:patch-1
Closed

Add #ifdef and #ifndef as brackets#161192
RedCMD wants to merge 5 commits intomicrosoft:mainfrom
RedCMD:patch-1

Conversation

@RedCMD
Copy link
Contributor

@RedCMD RedCMD commented Sep 18, 2022

Fixes #160744
extension of #159997 (#159586)

image

Cannot add #else, #elif, #elifdef or #elifndef as brackets
as Vscode does not support 'middle'/'inside' brackets
however, it does not cause any issues

Cannot add `#else`, `#elif`, `#elifdef` or `#elifndef` as `brackets`
as Vscode does not support 'middle'/'inside' `brackets`
this however does not cause any issues
@sean-mcmanus
Copy link
Contributor

@hediet This is important to get checked in ASAP -- otherwise the C/C++ experience is regressed with VS Code Insiders, i.e. red #endif appear all over the place with code bases that have heavy #ifdef/#ifndef usage.

@RedCMD RedCMD dismissed a stale review via c4284bb September 20, 2022 16:34
@hediet
Copy link
Member

hediet commented Sep 23, 2022

Closing, as we revert the #... brackets for cpp in #161589.

@hediet hediet closed this Sep 23, 2022
@RedCMD RedCMD deleted the patch-1 branch September 23, 2022 12:23
@sean-mcmanus
Copy link
Contributor

@hediet Okay, that seems fine. What were the problems though? I was only aware of the problem with #endif not matching with #ifdef and #ifndef which got fixed by this PR.

@hediet
Copy link
Member

hediet commented Sep 27, 2022

@sean-mcmanus you reported the problem here: #159586 (comment)
https://user-images.githubusercontent.com/19859882/190555400-e904a35f-7b33-4c8c-a534-cd5c9a7a6cc2.png

This one is not fixable.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#ifdef/endif colorization matching doesn't work correctly with C/C++

5 participants