microsoft / microsoft/vscode-cpptools

"C_Cpp: Dim Inactive Regions" removes code folding arrows in inactive regions

Open
#8,613 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request Language Service Visual Studio
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

We have written the needed data into your clipboard because it was too large to send. Please paste.
Issue Type: Bug

  • Open a C file with an inactive region, for example:
#ifdef inactive

int fun1() {
    return 1;
}

#else

int fun2() {
    return 2;
}

#endif
  • Enable "C_Cpp: Dim Inactive Regions"
  • Expected: A folding arrow appears for fun1, fun2, ifdef, else
  • Actual: A folding arrow appears for fun2, ifdef, else, but not for fun1

inactive

Extension version: 1.7.1
VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:39:46.686Z)
OS version: Linux x64 5.4.0-91-generic
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2591)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 25.43GB (0.40GB free)
Process Argv --unity-launch --crash-reporter-id e0b08cfb-692d-46c2-a2e8-1983e42a5725
Screen Reader no
VM 100%
DESKTOP_SESSION cinnamon
XDG_CURRENT_DESKTOP X-Cinnamon
XDG_SESSION_DESKTOP cinnamon
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30384385
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
vscop804:30404766
vscop341:30404997
vsrem710cf:30416617
vscexrecpromp3c:30407761

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in a C file using the provided inactive-region example, with “C_Cpp: Dim Inactive Regions” enabled. Trace the extension’s handling of inactive regions and folding, then verify that folding arrows appear for fun1, fun2, ifdef, and else without affecting the existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.