https://bugs.kde.org/show_bug.cgi?id=513963

            Bug ID: 513963
           Summary: Kate treats #ifdef blocks as comments if she evaluates
                    them to false
    Classification: Applications
           Product: kate
      Version First 25.12.0
       Reported In:
          Platform: Manjaro
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY

KDevelop does not do this, and I can't find anything about it, but I can't
imagine why anybody would want to disable syntax highlighting within an include
guard. It's been a while since I've been using KDE, but I don't remember Kate
ever doing this before. I apologize if this is the desired behavior, but I
can't find any documentation on it and it is undesirable behavior. I want to
edit the contents of #ifdef blocks regardless of whether or not Kate thinks
they will be executed.

STEPS TO REPRODUCE
Type

#ifdef __KATE__
struct test{ int m};
#endif

into a file highlighted as C++ source. 

OBSERVED RESULT

Everything in the #ifdef block is now grayed out / displayed as a comment and
thus all-but unreadable. Kate does parse the file to determine whether or not
she thinks the block will be evaluated, then grays out all text within the
block if she thinks it will not.

EXPECTED RESULT

Syntax highlighting should be enabled in comments. I don't want or expect
editors to treat or display the inside of an if() block differently based on
their prediction of its behavior, so I'm under the impression this is a bug and
not a desired function of the software.
SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 

( Manjaro Linux )
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.21.0
Qt Version: 6.10.1

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to