From 9b9c82983e61c0a13960e52791748042331a204a Mon Sep 17 00:00:00 2001 From: Martijn Laan <1092369+martijnlaan@users.noreply.github.com> Date: Fri, 14 Jun 2024 07:40:45 +0200 Subject: [PATCH] Fix SCI_SETSTATUS call. --- Components/ScintEdit.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Components/ScintEdit.pas b/Components/ScintEdit.pas index 368c93341..a0a5e9221 100644 --- a/Components/ScintEdit.pas +++ b/Components/ScintEdit.pas @@ -549,9 +549,10 @@ function TScintEdit.Call(Msg: Cardinal; WParam: Longint; LParam: Longint): Longi Result := FDirectStatusFunction(FDirectPtr, Msg, WParam, LParam, ErrorStatus); if ErrorStatus <> 0 then begin + var Dummy: Integer; + FDirectStatusFunction(FDirectPtr, SCI_SETSTATUS, 0, 0, Dummy); ErrorFmt('Error status %d returned after Call(%u, %d, %d) = %d', [ErrorStatus, Msg, WParam, LParam, Result]); - FDirectStatusFunction(FDirectPtr, SCI_SETSTATUS, 0, 0, ErrorStatus); end; end;