aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2007-07-14 11:12:08 +0000
committernyamatongwe <devnull@localhost>2007-07-14 11:12:08 +0000
commit272cb46f99debcd764f3a8806d5cf5c64d0b4144 (patch)
treec4d25f4edf110644d4acfc2778b6b4400068fedb /src
parentcb4dfc81d2e5f34495fe2df4a2e2035b60933156 (diff)
downloadscintilla-mirror-272cb46f99debcd764f3a8806d5cf5c64d0b4144.tar.gz
Jos van der Zande: Fixed Commentblock issue when LF's
are used as EOL.
Diffstat (limited to 'src')
-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));
}
}