mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-06 11:20:37 +01:00
LazControls: Fix an Index out of bounds error in ListFilterEdit.
This commit is contained in:
parent
91df8a8cfe
commit
be48000561
@ -328,9 +328,10 @@ begin
|
||||
xOldItemIndex := fFilteredListbox.ItemIndex;
|
||||
xSelStart := xOldItemIndex;
|
||||
xSelEnd := xOldItemIndex;
|
||||
while (xSelStart>=0) and fFilteredListbox.Selected[xSelStart] do
|
||||
while (xSelStart >= 0) and fFilteredListbox.Selected[xSelStart] do
|
||||
Dec(xSelStart);
|
||||
while (xSelEnd<fFilteredListbox.Count) and fFilteredListbox.Selected[xSelEnd] do
|
||||
while (xSelEnd < fFilteredListbox.Count)
|
||||
and ((xSelEnd < 0) or fFilteredListbox.Selected[xSelEnd]) do
|
||||
Inc(xSelEnd);
|
||||
fFilteredListbox.ItemIndex := AIndex;
|
||||
for i := Min(AIndex+1, xSelStart+1) to Max(AIndex-1, xSelEnd-1) do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user