diff options
author | nyamatongwe <unknown> | 2003-09-05 08:19:17 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-09-05 08:19:17 +0000 |
commit | a4d533628e2a0a9d8c597b1a7128e2f039d4b19f (patch) | |
tree | acc7ba5eda8daaa739d200c0887343963a48b676 | |
parent | a79f958fa36171b4ac0d50506d04887442171db8 (diff) | |
download | scintilla-mirror-a4d533628e2a0a9d8c597b1a7128e2f039d4b19f.tar.gz |
Ensure hotspot range initialised.
Bug fixed in LayoutLine when determining if line has not changed.
-rw-r--r-- | src/Editor.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 1376787fa..b75a62ec6 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -53,6 +53,8 @@ LineLayout::LineLayout(int maxLineLength_) : styles(0), indicators(0), positions(0), + hsStart(0), + hsEnd(0), widthLine(wrapWidthInfinite), lines(1) { Resize(maxLineLength_); @@ -1684,13 +1686,12 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou int numCharsInLine = 0; // See if chars, styles, indicators, are all the same bool allSame = true; - char styleByte; - int styleMask = pdoc->stylingBitsMask; + const int styleMask = pdoc->stylingBitsMask; // Check base line layout for (int charInDoc = posLineStart; allSame && (charInDoc < posLineEnd); charInDoc++) { char chDoc = pdoc->CharAt(charInDoc); - styleByte = pdoc->StyleAt(charInDoc); - if (vstyle.viewEOL || (!IsEOLChar(chDoc != '\r'))) { + if (vstyle.viewEOL || (!IsEOLChar(chDoc))) { + char styleByte = pdoc->StyleAt(charInDoc); allSame = allSame && (ll->styles[numCharsInLine] == static_cast<char>(styleByte & styleMask)); allSame = allSame && |