codetools: identifier completion: put exact matches at beginning

git-svn-id: trunk@12960 -
This commit is contained in:
mattias 2007-11-21 22:23:20 +00:00
parent 0c5ee1ee92
commit afd12b522a
2 changed files with 7 additions and 2 deletions

View File

@ -31,7 +31,8 @@ interface
uses uses
Classes, SysUtils, Classes, SysUtils,
CodeAtom, CodeCache, KeywordFuncLists, CustomCodeTool, FindDeclarationTool, AVL_Tree; FileProcs, CodeAtom, CodeCache, KeywordFuncLists, CustomCodeTool,
FindDeclarationTool, AVL_Tree;
type type

View File

@ -492,6 +492,10 @@ begin
{$IFDEF ShowFilteredIdents} {$IFDEF ShowFilteredIdents}
DebugLn('::: FILTERED ITEM ',FFilteredList.Count,' ',GetIdentifier(CurItem.Identifier)); DebugLn('::: FILTERED ITEM ',FFilteredList.Count,' ',GetIdentifier(CurItem.Identifier));
{$ENDIF} {$ENDIF}
if length(Prefix)=GetIdentLen(CurItem.Identifier) then
// put exact matches at the beginning
FFilteredList.Insert(0,CurItem)
else
FFilteredList.Add(CurItem); FFilteredList.Add(CurItem);
end; end;
AnAVLNode:=FItems.FindSuccessor(AnAVLNode); AnAVLNode:=FItems.FindSuccessor(AnAVLNode);