Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ecere/EditBox Syntax Highlighting: Fix for properly figuring and reme…

…mbering single line comment continuation (Correction to #489 and possibly problem reported as #675)
  • Loading branch information...
commit 02233f08da3f0b908d3fb59c62762487d631dc7b 1 parent 5c30ca5
@jerstlouis jerstlouis authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 ecere/src/gui/controls/EditBox.ec
View
10 ecere/src/gui/controls/EditBox.ec
@@ -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;
@@ -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;
@@ -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;
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.