diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2013-05-08 13:48:02 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2013-05-15 13:40:36 +0300 |
commit | 5a3e2bf9cbbcf6f4c33c0317a054ffffb3699b63 (patch) | |
tree | 244122d6c214d4f42e83000cb6b553b93634768c /scintilla/lexlib/StyleContext.h | |
parent | 4ec8a84b0b81489c687079215ffdedfc67ad1928 (diff) | |
download | notepad2-mod-5a3e2bf9cbbcf6f4c33c0317a054ffffb3699b63.zip notepad2-mod-5a3e2bf9cbbcf6f4c33c0317a054ffffb3699b63.tar.gz notepad2-mod-5a3e2bf9cbbcf6f4c33c0317a054ffffb3699b63.tar.bz2 |
Update Scintilla to 1d988d
Diffstat (limited to 'scintilla/lexlib/StyleContext.h')
-rw-r--r-- | scintilla/lexlib/StyleContext.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scintilla/lexlib/StyleContext.h b/scintilla/lexlib/StyleContext.h index c3194ae..1799793 100644 --- a/scintilla/lexlib/StyleContext.h +++ b/scintilla/lexlib/StyleContext.h @@ -76,7 +76,7 @@ class StyleContext { // End of line?
// Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win)
// or on LF alone (Unix). Avoid triggering two times on Dos/Win.
- if (lineStartNext < styler.Length())
+ if (currentLine < lineDocEnd)
atLineEnd = static_cast<int>(pos) >= (lineStartNext-1);
else // Last line
atLineEnd = static_cast<int>(pos) >= lineStartNext;
@@ -85,6 +85,7 @@ class StyleContext { public:
unsigned int currentPos;
int currentLine;
+ int lineDocEnd;
int lineStartNext;
bool atLineStart;
bool atLineEnd;
@@ -112,6 +113,7 @@ public: lengthDocument = static_cast<unsigned int>(styler.Length());
if (endPos == lengthDocument)
endPos++;
+ lineDocEnd = styler.GetLine(lengthDocument);
atLineStart = static_cast<unsigned int>(styler.LineStart(currentLine)) == startPos;
unsigned int pos = currentPos;
ch = static_cast<unsigned char>(styler.SafeGetCharAt(pos, 0));
|