From 510030822262b70e881d26d1287d1af60fb56c63 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 29 Nov 2005 12:10:38 +0000 Subject: When checking if a cached layout is still valid check the extra style byte after the last character used for eolFilled. --- src/Editor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index bb0f7ff53..ab7094112 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1942,10 +1942,11 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou bool allSame = true; const int styleMask = pdoc->stylingBitsMask; // Check base line layout + char styleByte = 0; for (int charInDoc = posLineStart; allSame && (charInDoc < posLineEnd); charInDoc++) { char chDoc = pdoc->CharAt(charInDoc); + styleByte = pdoc->StyleAt(charInDoc); if (vstyle.viewEOL || (!IsEOLChar(chDoc))) { - char styleByte = pdoc->StyleAt(charInDoc); allSame = allSame && (ll->styles[numCharsInLine] == static_cast(styleByte & styleMask)); allSame = allSame && @@ -1962,6 +1963,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou numCharsInLine++; } } + allSame = allSame && (ll->styles[numCharsInLine] == styleByte); // For eolFilled if (allSame) { ll->validity = LineLayout::llPositions; } else { -- cgit v1.2.3