[vfs_rework] Fix unselecting externally deleted or renamed item
ClosedPublic

Authored by martinkostolny on Nov 2 2016, 10:39 PM.

Details

Summary

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:

  1. When there was no current item, first item is focused. (already in code)
  2. When previous current item is found, it is focused. (already in code)
  3. When previous current item is not found, previous index is used for focus. (new)
  4. When previous index is too big (item size is smaller or or same as the index), last item is focused. (new)
  5. When previous index is not valid, first item is focused. (new)
Test Plan

Various external changes to files/folders in directory opened in krusader + observing if it is behaving ok.

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
martinkostolny retitled this revision from to [vfs_rework] Fix unselecting externally deleted or renamed item.
martinkostolny updated this object.
martinkostolny edited the test plan for this revision. (Show Details)
martinkostolny added a reviewer: abika.
martinkostolny set the repository for this revision to R167 Krusader.
martinkostolny added a project: Krusader.
abika accepted this revision.Nov 3 2016, 8:01 PM
abika edited edge metadata.

Its great and working fine. Thanks a lot!

This revision is now accepted and ready to land.Nov 3 2016, 8:01 PM
This revision was automatically updated to reflect the committed changes.