From cbb622465e27243281802abed4c87d7467aaedbf Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Tue, 11 May 2021 14:19:38 +0200 Subject: [PATCH] + fix: Scintilla missing recalculation of space width (to get correct tab width for indentation) --- scintilla/src/ViewStyle.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scintilla/src/ViewStyle.cxx b/scintilla/src/ViewStyle.cxx index d190ecf83..9d0ceaed5 100644 --- a/scintilla/src/ViewStyle.cxx +++ b/scintilla/src/ViewStyle.cxx @@ -338,6 +338,9 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) { someStylesForceCase = std::any_of(styles.cbegin(), styles.cend(), [](const Style &style) noexcept { return style.caseForce != Style::CaseForce::mixed; }); + // >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>> + spaceWidth = surface.WidthText(styles[STYLE_DEFAULT].font.get(), " "); + // <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<< tabWidth = spaceWidth * tabInChars; controlCharWidth = 0.0;