aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/StyleContext.h
diff options
context:
space:
mode:
authorMarko Njezic <devnull@localhost>2011-07-25 15:17:53 +0200
committerMarko Njezic <devnull@localhost>2011-07-25 15:17:53 +0200
commit3ec3a39efbf0a58ad6f66b18019d00068b94d7e4 (patch)
tree791e085f19d05d5f20ab56a11907322ef36196f6 /lexlib/StyleContext.h
parentb522518f79b3fee527d95c90c8e5925b24d94d3c (diff)
downloadscintilla-mirror-3ec3a39efbf0a58ad6f66b18019d00068b94d7e4.tar.gz
Properly set atLineStart depending on startPos. Bug #3377148.
Diffstat (limited to 'lexlib/StyleContext.h')
-rw-r--r--lexlib/StyleContext.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h
index 15d216bd1..c2d223e3f 100644
--- a/lexlib/StyleContext.h
+++ b/lexlib/StyleContext.h
@@ -55,7 +55,6 @@ public:
styler(styler_),
endPos(startPos + length),
currentPos(startPos),
- atLineStart(true),
atLineEnd(false),
state(initStyle & chMask), // Mask off all bits which aren't in the chMask.
chPrev(0),
@@ -63,6 +62,7 @@ public:
chNext(0) {
styler.StartAt(startPos, chMask);
styler.StartSegment(startPos);
+ atLineStart = static_cast<unsigned int>(styler.LineStart(styler.GetLine(startPos))) == startPos;
unsigned int pos = currentPos;
ch = static_cast<unsigned char>(styler.SafeGetCharAt(pos));
if (styler.IsLeadByte(static_cast<char>(ch))) {