diff options
author | nyamatongwe <unknown> | 2007-02-28 22:32:40 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2007-02-28 22:32:40 +0000 |
commit | 7feb2019aafcfeedc031add9d78a5d2e30174f17 (patch) | |
tree | d5083389775f09b198d0299bbc53beba227f473d /src/LexHTML.cxx | |
parent | 1d40ef24ad4828ca3b954cb98cf582c466d2adb3 (diff) | |
download | scintilla-mirror-7feb2019aafcfeedc031add9d78a5d2e30174f17.tar.gz |
Fix bug #1670851 by checking that not trying to style backwards.
Diffstat (limited to 'src/LexHTML.cxx')
-rw-r--r-- | src/LexHTML.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx index b4f471631..a89ce149a 100644 --- a/src/LexHTML.cxx +++ b/src/LexHTML.cxx @@ -863,7 +863,9 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty styler.ColourTo(i - 1, StateToPrint); state = SCE_H_SGML_SIMPLESTRING; } else if ((ch == '-') && (chPrev == '-')) { - styler.ColourTo(i - 2, StateToPrint); + if (static_cast<int>(styler.GetStartSegment()) <= (i - 2)) { + styler.ColourTo(i - 2, StateToPrint); + } state = SCE_H_SGML_COMMENT; } else if (isascii(ch) && isalpha(ch) && (chPrev == '%')) { styler.ColourTo(i - 2, StateToPrint); |