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