This patch is handling situations when current item is being externally removed or renamed.
Now, when refresh is about to happen, current item is stored (its name along with its index). Then:
- When there was no current item, first item is focused. (already in code)
- When previous current item is found, it is focused. (already in code)
- When previous current item is not found, previous index is used for focus. (new)
- When previous index is too big (item size is smaller or or same as the index), last item is focused. (new)
- When previous index is not valid, first item is focused. (new)