Skip to content

Commit

Permalink
ecere/EditBox Syntax Highlighting: Fix for properly figuring and reme…
Browse files Browse the repository at this point in the history
…mbering single line comment continuation (Correction to #489 and possibly problem reported as #675)
  • Loading branch information
jerstlouis committed May 29, 2012
1 parent 5c30ca5 commit 02233f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ecere/src/gui/controls/EditBox.ec
Expand Up @@ -79,7 +79,7 @@ class EditBoxBits
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;
bool inMultiLineComment:1, inPrep:1, escaped:1, continuedSingleLineComment:1;

bool recomputeSyntax:1;
bool cursorFollowsView:1;
Expand Down Expand Up @@ -1279,7 +1279,7 @@ private:
bool inPrep = reset ? false : style.inPrep;
bool inSingleLineComment = false;
bool escaped = reset ? false : style.escaped;
bool continuedSingleLineComment = false;
bool continuedSingleLineComment = reset ? false : style.continuedSingleLineComment;

EditLine line = reset ? lines.first : firstLine;
// int maxBackUp = 1000, c;
Expand Down Expand Up @@ -1361,10 +1361,10 @@ private:
}
firstWord = false;
}
continuedSingleLineComment = inSingleLineComment && (line.count && line.text[line.count - 1] == '\\');
}

continuedSingleLineComment = inSingleLineComment && (line.count && line.text[line.count - 1] == '\\');

style.continuedSingleLineComment = continuedSingleLineComment;
style.inMultiLineComment = inMultiLineComment;
style.inPrep = inPrep;
style.escaped = escaped;
Expand Down Expand Up @@ -1428,7 +1428,7 @@ private:
bool inPrep = style.inPrep;
bool inSingleLineComment = false;
bool escaped = style.escaped;
bool continuedSingleLineComment = false;
bool continuedSingleLineComment = style.continuedSingleLineComment;
// ****** ************* ******

if(!isEnabled)
Expand Down

0 comments on commit 02233f0

Please sign in to comment.