codetools: code completion: if cursor in interface search next node in front, bug #28359, patch from Ondrej Pokorny

git-svn-id: trunk@50002 -
This commit is contained in:
mattias 2015-10-08 17:00:00 +00:00
parent 72ea4f33b2
commit 1152bfdc38

View File

@ -9144,6 +9144,14 @@ begin
// test if forward proc
//debugln('TCodeCompletionCodeTool.CompleteCode ',CursorNode.DescAsString);
if CursorNode.Desc = ctnInterface then
begin//Search nearest (to the left) CursorNode if we are within interface section
CursorNode := CursorNode.LastChild;
while Assigned(CursorNode) and (CursorNode.StartPos > CleanCursorPos) do
CursorNode := CursorNode.PriorBrother;
if CursorNode=nil then
CursorNode:=FCompletingCursorNode;
end;
ProcNode:=CursorNode.GetNodeOfType(ctnProcedure);
if (ProcNode=nil) and (CursorNode.Desc=ctnProcedure) then
ProcNode:=CursorNode;