aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/LexOthers.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index 0db6e8f2c..6f500a06e 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -640,6 +640,9 @@ static void ColourisePoDoc(unsigned int startPos, int length, int, WordList *[],
}
}
+static inline bool isassignchar(unsigned char ch) {
+ return (ch == '=') || (ch == ':');
+}
static void ColourisePropsLine(
char *lineBuffer,
@@ -658,14 +661,14 @@ static void ColourisePropsLine(
styler.ColourTo(endPos, SCE_PROPS_SECTION);
} else if (lineBuffer[i] == '@') {
styler.ColourTo(startLine + i, SCE_PROPS_DEFVAL);
- if (lineBuffer[++i] == '=')
+ if (isassignchar(lineBuffer[i++]))
styler.ColourTo(startLine + i, SCE_PROPS_ASSIGNMENT);
styler.ColourTo(endPos, SCE_PROPS_DEFAULT);
} else {
// Search for the '=' character
- while ((i < lengthLine) && (lineBuffer[i] != '='))
+ while ((i < lengthLine) && !isassignchar(lineBuffer[i]))
i++;
- if ((i < lengthLine) && (lineBuffer[i] == '=')) {
+ if ((i < lengthLine) && isassignchar(lineBuffer[i])) {
styler.ColourTo(startLine + i - 1, SCE_PROPS_KEY);
styler.ColourTo(startLine + i, SCE_PROPS_ASSIGNMENT);
styler.ColourTo(endPos, SCE_PROPS_DEFAULT);