Fix crash in SynCompletionProposalChange, happening when scrolling very fast to the top of the list

This commit is contained in:
Ansgar Becker
2023-11-11 15:03:23 +01:00
parent 8507c85d19
commit 2715af3363

View File

@ -6695,7 +6695,8 @@ var
Proposal: TSynCompletionProposal;
begin
Proposal := Sender as TSynCompletionProposal;
Proposal.Title := Proposal.InsertItem(AIndex);
if (AIndex >= 0) and (AIndex < Proposal.ItemList.Count) then
Proposal.Title := Proposal.InsertItem(AIndex);
end;