On many occassion, the complete structure will try to complete end of the procedure when I was attempting to complete the end of if.
Example:
procedure toto(i : int )
if i = 0 then
if( i = 2 )
% position cursor here and attempt to complete twice
end toto
Result:
procedure toto(i : int )
if i = 0 then
if( i = 2 )
end if
end toto
end toto
Expected result:
procedure toto(i : int )
if i = 0 then
if( i = 2 )
end if
end if
end toto