diff --git a/dlanguilib.visualdproj b/dlanguilib.visualdproj index 34a97e5c..63ecfed8 100644 --- a/dlanguilib.visualdproj +++ b/dlanguilib.visualdproj @@ -66,7 +66,7 @@ 0 DebugFocus 0 - EmbedStandardResources Unicode USE_FREETYPE USE_SDL + EmbedStandardResources Unicode USE_FREETYPE 0 0 1 diff --git a/src/dlangui/widgets/editors.d b/src/dlangui/widgets/editors.d index ea56e7fc..63b1eab7 100644 --- a/src/dlangui/widgets/editors.d +++ b/src/dlangui/widgets/editors.d @@ -1844,7 +1844,8 @@ class EditBox : EditWidgetBase { lineIndex = 0; if (lineIndex < _visibleLines.length) { res.line = lineIndex + _firstVisibleLine; - for (int i = 0; i < _visibleLinesMeasurement[lineIndex].length; i++) { + int len = cast(int)_visibleLines[lineIndex].length; + for (int i = 0; i < len; i++) { int x0 = i > 0 ? _visibleLinesMeasurement[lineIndex][i - 1] : 0; int x1 = _visibleLinesMeasurement[lineIndex][i]; int mx = (x0 + x1) >> 1;