fix #384 - Calltip after colon doesn't skip nested calls that are complete

This commit is contained in:
Basile Burg 2018-12-14 05:51:43 +01:00
parent 1c67ea6495
commit 7d9c394a74
1 changed files with 9 additions and 2 deletions

View File

@ -2617,6 +2617,7 @@ var
str, lne: string;
i, x: integer;
j: integer = 0;
n: integer = 0;
begin
if not fIsDSource and not alwaysAdvancedFeatures then
exit;
@ -2631,10 +2632,16 @@ begin
break;
if str[i] = ',' then
j += 1;
if str[i] = ')' then
n += 1;
if str[i-1] = '(' then
begin
LogicalCaretXY := Point(i, CaretY);
break;
if n = 0 then
begin
LogicalCaretXY := Point(i, CaretY);
break;
end
else n -= 1;
end;
if str[i] = #9 then
i -= TabWidth