From 5707d7fa8b7bae2602c619cf349c1ca06371fe3a Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 21 Aug 2020 12:30:27 +1000 Subject: Backport: Bug [#2197]. Fixed bug where layout caching was ineffective. Backport of changeset 8482:aa1c8541f6e1. --- doc/ScintillaHistory.html | 4 ++++ src/EditView.cxx | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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 @@
  • Fixed bug where gradient indicators were not showing hovered appearance.
  • +
  • + Fixed bug where layout caching was ineffective. + Bug #2197. +
  • Release 3.21.0 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 { -- cgit v1.2.3