mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 10:59:05 +02:00
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:
parent
72ea4f33b2
commit
1152bfdc38
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user