aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaHistory.html4
-rw-r--r--src/EditView.cxx3
2 files changed, 6 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 011c89bdf..8ab756144 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -593,6 +593,10 @@
<li>
Fixed bug where gradient indicators were not showing hovered appearance.
</li>
+ <li>
+ Fixed bug where layout caching was ineffective.
+ <a href="https://sourceforge.net/p/scintilla/bugs/2197/">Bug #2197</a>.
+ </li>
</ul>
<h3>
<a href="https://sourceforge.net/projects/scintilla/files/scintilla/3.21.0/scintilla3210.zip/download">Release 3.21.0</a>
diff --git a/src/EditView.cxx b/src/EditView.cxx
index cc6bf7e3b..1b2beb683 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -410,7 +410,8 @@ void EditView::LayoutLine(const EditModel &model, Sci::Line line, Surface *surfa
chPrevious = chDoc;
numCharsInLine++;
}
- allSame = allSame && (ll->styles[numCharsInLine] == styleByte); // For eolFilled
+ const int styleByteLast = (posLineEnd > posLineStart) ? model.pdoc->StyleIndexAt(posLineEnd - 1) : 0;
+ allSame = allSame && (ll->styles[numCharsInLine] == styleByteLast); // For eolFilled
if (allSame) {
ll->validity = LineLayout::ValidLevel::positions;
} else {