Skip to content

Inaction regions are no longer grayed out after navigating away and back to a file #8206

Description

Issue Type: Bug

I have multiple build configurations defined in c_cpp_properties.json. They each include a compiler define that is needed for various #ifdef statements throughout the code. Those blocks of code remain greyed out even when I have that build configuration selected/enabled. If I open c_cpp_properties.json, it re-reads the configuration and recognizes that I have the build configuration selected and temporarily reactivates those blocks of code. But those blocks of code are greyed out again as soon as I switch to another tab. For instance, I have a configuration called Gemini and the configuration in c_cpp_properties.json defines "BUILD_GEMINI", which enables blocks of #ifdef BUILD_GEMINI but, like I said, only temporarily and only after I open c_cpp_properties.json in a new tab. That build flag isn't defined anywhere else in the code. It's defined in a Python script I use to execute CMake, so VS Code is otherwise unaware of that flag.

Extension version: 1.6.0
VS Code version: Code 1.60.2 (Universal) (7f6ab5485bbc008386c4386d08766667e155244e, 2021-09-22T11:59:27.195Z)
OS version: Darwin x64 20.6.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 3
Memory (System) 32.00GB (0.11GB free)
Process Argv --crash-reporter-id 6174584c-6c3f-46ab-bf54-612f92eace5d
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
vscextlang:30333561
binariesv615:30325510
vsccppwtct:30364498
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt2:30371810
dockerwalkthrucf:30370837
bridge0723:30353136
pythonrunftest32cf:30365367
pythonf5test824:30361777
javagetstartedt:30364666
pythonvspyt187:30365361
pydsgsc2:30361791
vssid140cf:30363604
vssur157:30367808

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions