aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2010-08-02 14:50:37 +1000
committernyamatongwe <unknown>2010-08-02 14:50:37 +1000
commitb150425346614b7a81f5e54ad948d1136fe3683b (patch)
tree8bde60f2c3db9f6b6ebf5e6a050d45fd4e00d8f3
parente5249de60e25497d71d164e0d9c3004a7ea254ff (diff)
downloadscintilla-mirror-b150425346614b7a81f5e54ad948d1136fe3683b.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