From 60cf3dfd2a9b083f2748859b11227cae7d7255c5 Mon Sep 17 00:00:00 2001
From: Sergii Pylypenko <x.pelya.x@gmail.com>
Date: Thu, 7 Feb 2019 20:34:46 +0200
Subject: [PATCH 2/2] mcedit: fixed syntax highlighting bug in .c and .cxx
syntax scripts
To reproduce, open this .c file in mcedit (remove backslashes):
/* this preprocessor macro is not colorized,
when there is whitespace before '#' and the next line is not empty */
\ #if not_colorized
int code;
/* this preprocessor macro is colorized properly, the next line is empty */
\ #if colorized
int code2;
---
misc/syntax/c.syntax | 2 +-
misc/syntax/cxx.syntax | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/misc/syntax/c.syntax b/misc/syntax/c.syntax
index 91f070c88..e6fabe997 100644
a
|
b
|
context default |
36 | 36 | keyword whole inline yellow |
37 | 37 | keyword whole wchar_t yellow |
38 | 38 | keyword whole ... yellow |
39 | | keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta |
| 39 | keyword linestart \{\s\t\}\[\s\t\]#*\n brightmagenta |
40 | 40 | keyword whole \[\s\t\]default yellow |
41 | 41 | keyword whole linestart \[\s\t\]\{ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\}\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\]: cyan |
42 | 42 | |
diff --git a/misc/syntax/cxx.syntax b/misc/syntax/cxx.syntax
index 3ac9f1fca..08cd444be 100644
a
|
b
|
context default |
62 | 62 | keyword whole using yellow |
63 | 63 | keyword whole wchar_t yellow |
64 | 64 | keyword whole ... yellow |
65 | | keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta |
| 65 | keyword linestart \{\s\t\}\[\s\t\]#*\n brightmagenta |
66 | 66 | |
67 | 67 | keyword /\* brown |
68 | 68 | keyword \*/ brown |