aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-08-02 14:50:37 +1000
committernyamatongwe <devnull@localhost>2010-08-02 14:50:37 +1000
commitf5524ed07ac6f093cdccd729fc440f12936827f5 (patch)
tree85f2bb4c4706ad98dbefb55e374625b01b93f142
parentcb4779ec6f2817db09d4b1eefc123a77c8bc4e8e (diff)
downloadscintilla-mirror-f5524ed07ac6f093cdccd729fc440f12936827f5.tar.gz
Moved line state one line earlier so it refers to the state at the end of the line.
This makes it more robust when lines are inserted or removed as occurred in bug #3032652.
-rw-r--r--lexers/LexHTML.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx
index 6aa2e13bc..0d54e7a3e 100644
--- a/lexers/LexHTML.cxx
+++ b/lexers/LexHTML.cxx
@@ -615,7 +615,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
int lineCurrent = styler.GetLine(startPos);
int lineState;
if (lineCurrent > 0) {
- lineState = styler.GetLineState(lineCurrent);
+ lineState = styler.GetLineState(lineCurrent-1);
} else {
// Default client and ASP scripting language is JavaScript
lineState = eScriptJS << 8;
@@ -798,8 +798,6 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
visibleChars = 0;
levelPrev = levelCurrent;
}
- lineCurrent++;
- lineStartVisibleChars = 0;
styler.SetLineState(lineCurrent,
((inScriptType & 0x03) << 0) |
((tagOpened & 0x01) << 2) |
@@ -807,6 +805,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
((aspScript & 0x0F) << 4) |
((clientScript & 0x0F) << 8) |
((beforePreProc & 0xFF) << 12));
+ lineCurrent++;
+ lineStartVisibleChars = 0;
}
// Allow falling through to mako handling code if newline is going to end a block