Jedi Code Format: Fix indentation of generic function forward declarations. Issue #40055, patch by Domingo Galmés.

This commit is contained in:
Juha 2022-12-23 09:04:40 +02:00
parent be093cd40d
commit 0777a5b939

View File

@ -390,7 +390,16 @@ begin
}
else if pt.HasParentNode(nDeclSection) and (not pt.HasParentNode(ProcedureNodes)) then
begin
if pt.TokenType in Declarations + ProcedureWords then
// generic procedure/fucntion declarations.
if (pt.TokenType=ttGeneric) and (pt.NextSolidTokenType in ProcedureWords) then
begin
if (pt.NextSolidTokenType in ProcedureWords + ParamTypes) and
(pt.HasParentNode(nProcedureType) or pt.HasParentNode(nFormalParams)) then
liIndentCount := 1
else
liIndentCount := 0;
end
else if pt.TokenType in Declarations + ProcedureWords then
begin
{
the words 'var' and 'const' can be found in proc params