It appears to me that the bug that had been mentioned 10 years ago at the beginning of the article
(wrong virtuallistview first row refresh when changing item count) is still alive.
I did struggle some hours with the following strange behaviour:
virtual listview. listview contains 2 rows. Try to delete the first row.
For a short period / delay of time, the wrong one (the second row) appears to be deleted.
Berause the first row (=> after deletion, the previous second row will be tne new first row now)
resp. the first row's content will be wrongly refreshed.
Until i found the circumvention within this article (see reply #9), that did fix the strange behaviour:
svi := Items[i].Index;
DeleteArrayItem(FFlieInfo, svi);
Dec(FFlieInfoCount);
Delete(Items[i]);
// Due to Lazarus bug related to wrong virtuallistview first row refresh / with workaround:
// https://forum.lazarus.freepascal.org/index.php/topic,11796.msg59695.html#msg59695
Items.Count := 0; // Workaround
Items.Count := FFlieInfoCount;
Self.Refresh; // Workaround