From 1391fc80ff83f310941c2fa9c1c6723fe373663a Mon Sep 17 00:00:00 2001 From: Alextp Date: Mon, 12 Oct 2020 11:36:24 +0300 Subject: [PATCH] fix https://github.com/Alexey-T/CudaText/issues/2899 --- atsynedit/atsynedit.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/atsynedit/atsynedit.pas b/atsynedit/atsynedit.pas index bf6ad2eb2..1e4eb7eac 100644 --- a/atsynedit/atsynedit.pas +++ b/atsynedit/atsynedit.pas @@ -2211,8 +2211,10 @@ procedure TATSynEdit.SetWrapMode(AValue: TATSynWrapMode); FWrapMode:= AValue; FWrapUpdateNeeded:= true; - UpdateWrapInfo; //helps to solve https://github.com/Alexey-T/CudaText/issues/2879 - //FWrapUpdateNeeded:=true and Update() is not enough + + if HandleAllocated then //required for Win32 + UpdateWrapInfo; //helps to solve https://github.com/Alexey-T/CudaText/issues/2879 + //FWrapUpdateNeeded:=true and Update() is not enough if FWrapMode<>cWrapOff then FScrollHorz.SetZero;