-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Intellisense glitches rapidly between C and C++ for header #9689
Comments
Are you able to repro the problem in a workspace we're able to try? We have not yet seen a report of this strange behavior before. |
Hi @vananasun . Could you provide the output of the |
I've hit a similar issue. For me it turned out to be due to settings.json populating two of the same header files (one capitalised) but associating one with "c" and the other with "cpp". OS: Windows (Pro) 10.0.19044 Build 19044 example problematic settings.json
example ok settings.json
|
@lachlanm-git Do you know how to trigger the bug though? I set the files.associations, but I don't see any rapid switching. |
@sean-mcmanus , sorry, I can't reproduce it myself anymore. I'm still on the same VS Code version; I'm not sure what I've changed. I'll come back and post if I come across it again and have any useful logs/steps to help reproduce. |
Hey @sean-mcmanus, this issue might need further attention. @vananasun, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
@vananasun @sean-mcmanus I encountered this problem recently as well and I can reproduce it like so:
If I launch VSCode from a terminal in the new folder, the workspace settings will be empty initially. Next, I do this:
You can then observe that workspace settings will have been automatically created that contain the following content:
I encountered this while porting an old MS-DOS program from the 90s to x64 and all of the old filenames were uppercase. During porting I used lowercase in the new inclusions out of habit. OS: Windows 10.0.19044 Build 19044 |
This is a regression starting with https://github.com/microsoft/vscode-cpptools/releases/tag/1.8.0-insiders triggered by: "Fix an issue in which the language id for header files were not updated to match the source file of its TU. #8381" |
FYI, using setting |
The fix is available with 1.14.0 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.14.0 |
Environment
OS: Windows 10.0.19042 Build 19042
VSCode: 1.70.0
C/C++ Extension v1.11.4
I tried disabling all other extensions, problem still occurs.
Often but not always, any .h header file will make the language mode rapidly switch back and forth between C and C++, causing extreme lag and flickering of syntax highlighting.
This happens despite any overridden language mode setting for the file.
When no glitching occurs, overriding the language mode to C will switch to C++ instantly.
(see animated screenshot)
Bug Summary and Steps to Reproduce
Bug Summary: Header files cause intellisense to rapidly switch between C/C++ language mode.
Steps to reproduce:
OR
Expected behavior
Should stay at the language I or it chose.
Code sample and Logs
Screenshots
Additional context
No response
The text was updated successfully, but these errors were encountered: