From dc9291dd6bc619647f8a9031095413e2ca0b5bf8 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Tue, 11 May 2021 14:25:55 +0200 Subject: [PATCH] + fix: space-width, avgchar-width and tab-width calculation --- scintilla/src/ViewStyle.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scintilla/src/ViewStyle.cxx b/scintilla/src/ViewStyle.cxx index 9d0ceaed5..de7f816a7 100644 --- a/scintilla/src/ViewStyle.cxx +++ b/scintilla/src/ViewStyle.cxx @@ -338,9 +338,8 @@ 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 <<<<<<<<<<<<<<< + aveCharWidth = styles[STYLE_DEFAULT].aveCharWidth; + spaceWidth = styles[STYLE_DEFAULT].spaceWidth; tabWidth = spaceWidth * tabInChars; controlCharWidth = 0.0;