mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 09:35:59 +02:00
codetools: code completion: if cursor in interface search nearest node in front and same line
git-svn-id: trunk@50003 -
This commit is contained in:
parent
1152bfdc38
commit
580b22f36e
@ -9145,11 +9145,13 @@ 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
|
||||
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
|
||||
if (CursorNode=nil)
|
||||
or (not PositionsInSameLine(Src,CursorNode.EndPos,CleanCursorPos)) then
|
||||
CursorNode:=FCompletingCursorNode;
|
||||
end;
|
||||
ProcNode:=CursorNode.GetNodeOfType(ctnProcedure);
|
||||
|
Loading…
Reference in New Issue
Block a user