Division by zero when dragging application
Posted: Wed Oct 08, 2025 1:43 pm
Hi
I get Division by zero when I drag a application to a monitor with scale 125% from a monitor with scale 100%.
The error only occurs when TRichViewEdit.WordWrap := False and TAB occurs in text.
RichViewEdit1.WordWrap := False;
RichViewEdit1.InsertText('Kalle '#9'Olle'#$D#$A);
I found some strange code in CRVFData.pas at line 6192:
LineStartX := RV_XToDevice(GetLeftMargin, TmpSad) + LeftIndent + FirstIndent;
If the parameter "sad" to TCustomRVFormattedData.CalculateMinItemsWidthNoWrap is not "nil" the local var "TmpSad" (TRVScreenAndDevice) is not initialied. Se attached application.
Using Using TRichView v23.0.1
I get Division by zero when I drag a application to a monitor with scale 125% from a monitor with scale 100%.
The error only occurs when TRichViewEdit.WordWrap := False and TAB occurs in text.
RichViewEdit1.WordWrap := False;
RichViewEdit1.InsertText('Kalle '#9'Olle'#$D#$A);
I found some strange code in CRVFData.pas at line 6192:
LineStartX := RV_XToDevice(GetLeftMargin, TmpSad) + LeftIndent + FirstIndent;
If the parameter "sad" to TCustomRVFormattedData.CalculateMinItemsWidthNoWrap is not "nil" the local var "TmpSad" (TRVScreenAndDevice) is not initialied. Se attached application.
Using Using TRichView v23.0.1