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

            Bug ID: 405903
           Summary: Wrong highlighting for the next non-empty line when C
                    macro ends by a backslash and an empty line
           Product: kate
           Version: Git
          Platform: Debian testing
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: syntax
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: raphael....@jakse.fr
  Target Milestone: ---

Created attachment 119059
  --> https://bugs.kde.org/attachment.cgi?id=119059&action=edit
Unfortunate fate for an otherwise fine line - invaded by a greedy macro.

Hello,

CONSIDER THE FOLLOWING C CODE (notice the backslash at the end of the first
line):

    #define hello "hello" \

    int main() { puts(hello); return 0; }

OBSERVED RESULT

The line:

    int main() { puts(hello); return 0; }

Appears in non-bold green with the default highlighting settings.

EXPECTED RESULT

Said line should be highlighted (everything in black except "int" in blue and 0
in yellow, and "return" in bold with the default highlighting settings).


ADDITIONAL INFORMATION

    $ gcc -ansi test.c -o t; ./t
    hello

    if any character (space, letter or anything) is added to line 2, the
highlighting is done correctly.
    Also, KDevelop seems unaffected by this issue.

SOFTWARE/OS VERSIONS

 - Kate 18.08.0,  KDE Frameworks 5.54.0, Qt 5.11.3 on Debian GNU/Linux testing
 - Kate 19.07.70, KDE Frameworks 5.57.0, Qt 5.12.0 from the latest KDE Neon
Docker image

WHY WOULD YOU END A MACRO WITH A BACKSLASH?

I also indent code using 7 spaces and one tab in the middle of them and ban
people who mess this up from my projects.

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

Reply via email to