vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Add `#ifdef` and `#ifndef` as `brackets`

Open RedCMD opened this issue 3 years ago • 1 comments

Fixes https://github.com/microsoft/vscode/issues/160744 extension of https://github.com/microsoft/vscode/pull/159997 (https://github.com/microsoft/vscode/issues/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

RedCMD avatar Sep 18 '22 07:09 RedCMD

@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.

sean-mcmanus avatar Sep 20 '22 15:09 sean-mcmanus

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

hediet avatar Sep 23 '22 12:09 hediet

@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.

sean-mcmanus avatar Sep 23 '22 16:09 sean-mcmanus

@sean-mcmanus you reported the problem here: https://github.com/microsoft/vscode/issues/159586#issuecomment-1248899801 https://user-images.githubusercontent.com/19859882/190555400-e904a35f-7b33-4c8c-a534-cd5c9a7a6cc2.png

This one is not fixable.

hediet avatar Sep 27 '22 09:09 hediet