IDE, Identifier-Completion: fix crash when using template completion. Issue #40439

This commit is contained in:
Martin 2023-08-10 09:38:19 +02:00
parent 91052758c8
commit ebe39d7d54

View File

@ -2724,9 +2724,10 @@ begin
Font.Style:=[];
end;
if CodeToolBoss.IdentifierList.SortForHistory and
(iliIsRecentItem in CodeToolBoss.IdentifierList.FilteredItems[Index].Flags) and
(FActiveHistoryTextColor <> clNone)
if (CurrentCompletionType = ctIdentCompletion) and
(CodeToolBoss.IdentifierList.SortForHistory) and
(iliIsRecentItem in CodeToolBoss.IdentifierList.FilteredItems[Index].Flags) and
(FActiveHistoryTextColor <> clNone)
then begin
Colors.TextColor := FActiveHistoryTextColor; // - to display history items
end else begin