mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 20:39:14 +02:00
codetools: identifier completion: do not clear on change
git-svn-id: trunk@31625 -
This commit is contained in:
parent
133696ef7b
commit
d054dea35c
@ -5163,8 +5163,8 @@ begin
|
|||||||
CTIncreaseChangeStamp(FCodeNodeTreeChangeStep);
|
CTIncreaseChangeStamp(FCodeNodeTreeChangeStep);
|
||||||
if NodesDeleting then begin
|
if NodesDeleting then begin
|
||||||
CTIncreaseChangeStamp(FCodeTreeNodesDeletedStep);
|
CTIncreaseChangeStamp(FCodeTreeNodesDeletedStep);
|
||||||
if (IdentifierList<>nil) and (not FIdentifierListUpdating) then
|
// Note: IdentifierList nodes do not need to be cleared, because Node
|
||||||
IdentifierList.ToolTreeNodesDeleting(Tool,NodesDeleting);
|
// is accessed via GetNode, which checks if nodes were deleted
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -231,7 +231,6 @@ type
|
|||||||
function StartUpAtomInFrontIs(const s: string): boolean;
|
function StartUpAtomInFrontIs(const s: string): boolean;
|
||||||
function StartUpAtomBehindIs(const s: string): boolean;
|
function StartUpAtomBehindIs(const s: string): boolean;
|
||||||
function CompletePrefix(const OldPrefix: string): string;
|
function CompletePrefix(const OldPrefix: string): string;
|
||||||
procedure ToolTreeNodesDeleting(Tool: TCustomCodeTool; NodesDeleting: boolean);
|
|
||||||
function CalcMemSize: PtrUInt;
|
function CalcMemSize: PtrUInt;
|
||||||
public
|
public
|
||||||
property Context: TFindContext read FContext write FContext;
|
property Context: TFindContext read FContext write FContext;
|
||||||
@ -828,33 +827,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIdentifierList.ToolTreeNodesDeleting(Tool: TCustomCodeTool;
|
|
||||||
NodesDeleting: boolean);
|
|
||||||
var
|
|
||||||
ItemNode: TAVLTreeNode;
|
|
||||||
Item: TIdentifierListItem;
|
|
||||||
begin
|
|
||||||
if Tool=nil then exit;
|
|
||||||
if FIdentView.Count=0 then exit;
|
|
||||||
if (FUsedTools=nil) or (ilfUsedToolsNeedsUpdate in FFlags) then begin
|
|
||||||
Exclude(FFlags,ilfUsedToolsNeedsUpdate);
|
|
||||||
// create list of all used tools
|
|
||||||
if FUsedTools=nil then
|
|
||||||
FUsedTools:=TAVLTree.Create
|
|
||||||
else
|
|
||||||
FUsedTools.Clear;
|
|
||||||
ItemNode:=FItems.FindLowest;
|
|
||||||
while ItemNode<>nil do begin
|
|
||||||
Item:=TIdentifierListItem(ItemNode.Data);
|
|
||||||
if (Item.Tool<>nil) and (FUsedTools.Find(Item.Tool)=nil) then
|
|
||||||
FUsedTools.Add(Item.Tool);
|
|
||||||
ItemNode:=FItems.FindSuccessor(ItemNode);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
if FUsedTools.Find(Tool)=nil then exit;
|
|
||||||
Clear;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TIdentifierList.CalcMemSize: PtrUInt;
|
function TIdentifierList.CalcMemSize: PtrUInt;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user