From a4d533628e2a0a9d8c597b1a7128e2f039d4b19f Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 5 Sep 2003 08:19:17 +0000 Subject: Ensure hotspot range initialised. Bug fixed in LayoutLine when determining if line has not changed. --- src/Editor.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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(styleByte & styleMask)); allSame = allSame && -- cgit v1.2.3