bool noCaret:1, noSelect:1, tabKey:1, useTab:1, tabSel:1, allCaps:1, syntax:1, wrap:1;
// Syntax States
- bool inMultiLineComment:1, inPrep:1, escaped:1, continuedSingleLineComment:1;
+ bool inMultiLineComment:1, inPrep:1, escaped:1, continuedSingleLineComment:1, wasInMultiLine:1;
bool recomputeSyntax:1;
bool cursorFollowsView:1;
if(style.syntax)
{
bool inMultiLineComment = reset ? false : style.inMultiLineComment;
+ bool wasInMultiLine = reset ? false : style.wasInMultiLine;
bool inString = false;
bool inQuotes = false;
bool inPrep = reset ? false : style.inPrep;
{
bool wasEscaped = escaped;
bool backLastWasStar = lastWasStar;
+ bool backWasInMultiLine = wasInMultiLine;
escaped = false;
lastWasStar = false;
+ wasInMultiLine = inMultiLineComment;
if(ch == '/')
{
if(!inSingleLineComment && !inMultiLineComment && !inQuotes && !inString)
}
else if(ch == '*')
{
- if(!c || text[c-1] != '/') lastWasStar = true;
+ if(backWasInMultiLine) lastWasStar = true;
}
else if(ch == '\"' && !inSingleLineComment && !inMultiLineComment && !inQuotes)
{
style.continuedSingleLineComment = continuedSingleLineComment;
style.inMultiLineComment = inMultiLineComment;
+ style.wasInMultiLine = wasInMultiLine;
style.inPrep = inPrep;
style.escaped = escaped;
}
bool inSingleLineComment = false;
bool escaped = style.escaped;
bool continuedSingleLineComment = style.continuedSingleLineComment;
+ bool wasInMultiLine = false;
// ****** ************* ******
if(!isEnabled)
bool backInQuotes = inQuotes;
bool backInPrep = inPrep;
bool backInSingleLineComment = inSingleLineComment;
+ bool backWasInMultiLine = wasInMultiLine;
char * word = line.buffer + c - wordLen;
int g,ccc;
escaped = false;
lastWasStar = false;
+ wasInMultiLine = inMultiLineComment;
+
// Determine Syntax Highlighting
newTextColor = defaultTextColor;
if(style.syntax)
}
else if(wordLen == 1 && word[0] == '*')
{
- if(c < 2 || word[-1] != '/')
+ if(backWasInMultiLine)
lastWasStar = true;
}
else if(!inSingleLineComment && !inMultiLineComment && !inQuotes && wordLen == 1 && word[0] == '\"')
inQuotes = backInQuotes;
inPrep = backInPrep;
inSingleLineComment = backInSingleLineComment;
+ wasInMultiLine = backWasInMultiLine;
break;
}
else