Codetools: Complete code correctly for "procedure xxx; forward;". Issue #39510, patch by Domingo Galmés.

(cherry picked from commit dfa66431c4)
This commit is contained in:
Juha 2022-01-23 12:04:16 +02:00 committed by Maxim Ganetsky
parent 2451cd3995
commit 8781fcb5f4

View File

@ -1009,7 +1009,8 @@ begin
while (NearestProcNode.NextBrother<>nil) do
NearestProcNode:=NearestProcNode.NextBrother;
if NearestProcNode<>nil then begin
SetIndentAndInsertPos(NearestProcNode,true);
// don't insert after "begin end." block in program. Issue #39510
SetIndentAndInsertPos(NearestProcNode, NearestProcNode.Desc<>ctnBeginBlock);
exit;
end;