Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Code block disabled with #if 0 is not grayed out #335

Open
1 task done
barisdemiray opened this issue Sep 18, 2019 · 1 comment
Open
1 task done

Code block disabled with #if 0 is not grayed out #335

barisdemiray opened this issue Sep 18, 2019 · 1 comment

Comments

@barisdemiray
Copy link

Prerequisites

Description

A code block is not grayed out when it is disabled with #if 0 and a corresponding #endif.

Steps to Reproduce

  1. Type the snipped below and observe that it is highlighted as if it wasn't "disabled".
#if 0
        {
            cap >> frame;
            if (frame.empty())
            {
                waitKey();
                break;
            }
#endif

Expected behavior:

I'd expect it to be grayed out as if it was a comment line.

Actual behavior:

It is highlighted as if this block wasn't taken out of the build.

Reproduces how often:

Everytime.

Versions

Atom : 1.40.1
Electron: 3.1.10
Chrome : 66.0.3359.181
Node : 10.2.0

Additional Information

@rsese
Copy link

rsese commented Sep 18, 2019

Thanks for the report! Reproduced with 1.42.0-nightly7 on macOS 10.14.6:

preprocessor-treesitter

For comparison with Tree-sitter disabled and checking the scopes for any of the greyed out text:

preprocessor-textmate

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants