From 66185664e71b7cd65fa933467e338c665b2d5b88 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Mon, 13 Oct 2025 13:27:07 +1100 Subject: Fix Cocoa bidirectional mode crash when scrolled before start of document. --- doc/ScintillaHistory.html | 3 +++ src/EditView.cxx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 9d41f3cfa..65d6b9fcb 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -615,6 +615,9 @@ Bug #2482.
  • + On Cocoa, fix crash with bidirectional mode when scrolled before start of document. +
  • +
  • On Cocoa, use same default calltip colours as other platforms for consistency. Bug #2486.
  • diff --git a/src/EditView.cxx b/src/EditView.cxx index dddd84d94..3bf0a1fbb 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -602,7 +602,7 @@ void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewSt // Fill the LineLayout bidirectional data fields according to each char style void EditView::UpdateBidiData(const EditModel &model, const ViewStyle &vstyle, LineLayout *ll) { - if (model.BidirectionalEnabled()) { + if (model.BidirectionalEnabled() && (ll->numCharsInLine >= 0)) { ll->EnsureBidiData(); for (int stylesInLine = 0; stylesInLine < ll->numCharsInLine; stylesInLine++) { ll->bidiData->stylesFonts[stylesInLine] = vstyle.styles[ll->styles[stylesInLine]].font; -- cgit v1.2.3