aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexAU3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/LexAU3.cxx')
-rw-r--r--src/LexAU3.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/LexAU3.cxx b/src/LexAU3.cxx
index ffd9f71fa..b577c58d6 100644
--- a/src/LexAU3.cxx
+++ b/src/LexAU3.cxx
@@ -43,6 +43,7 @@
// Mar 12, 2006 - Fixed issue with <> coloring as String in stead of Operator in rare occasions.
// Apr 8, 2006 - Added support for AutoIt3 Standard UDF library (SCE_AU3_UDF)
// Mar 9, 2007 - Fixed bug with + following a String getting the wrong Color.
+// Jun 20, 2007 - Fixed Commentblock issue when LF's are used as EOL.
//
// Copyright for Scintilla: 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
@@ -251,7 +252,12 @@ static void ColouriseAU3Doc(unsigned int startPos,
//Reset at line end
if (sc.atLineEnd) {
ci=0;
- sc.SetState(SCE_AU3_COMMENTBLOCK);
+ if ((strcmp(s, "#ce")== 0 || strcmp(s, "#comments-end")== 0))
+ if (sc.atLineEnd)
+ sc.SetState(SCE_AU3_DEFAULT);
+ else
+ sc.SetState(SCE_AU3_COMMENTBLOCK);
+ break;
}
//skip rest of line when a ; is encountered
if (sc.chPrev == ';') {
@@ -270,12 +276,12 @@ static void ColouriseAU3Doc(unsigned int startPos,
break;
}
if (!(IsAWordChar(sc.ch) || (sc.ch == '-' && strcmp(s, "#comments") == 0))) {
- if ((strcmp(s, "#ce")== 0 || strcmp(s, "#comments-end")== 0))
- sc.SetState(SCE_AU3_COMMENT); // set to comment line for the rest of the line
+ if ((strcmp(s, "#ce")== 0 || strcmp(s, "#comments-end")== 0))
+ sc.SetState(SCE_AU3_COMMENT); // set to comment line for the rest of the line
else
ci=2; // line doesn't begin with #CE so skip the rest of the line
}
- break;
+ break;
}
case SCE_AU3_COMMENT:
{
@@ -309,6 +315,7 @@ static void ColouriseAU3Doc(unsigned int startPos,
{
sc.ChangeState(SCE_AU3_COMMENTBLOCK);
sc.SetState(SCE_AU3_COMMENTBLOCK);
+ break;
}
else if (keywords.InList(s)) {
sc.ChangeState(SCE_AU3_KEYWORD);
@@ -723,7 +730,7 @@ static void FoldAU3Doc(unsigned int startPos, int length, int, WordList *[], Acc
szKeyword[szKeywordlen] = '\0';
}
else {
- if (szKeywordlen < 10) {
+ if (szKeywordlen < 9) {
szKeyword[szKeywordlen++] = static_cast<char>(tolower(ch));
}
}