Set the focus on the first search result
ClosedPublic

Authored by asensi on Jul 23 2019, 6:38 AM.

Details

Summary

Set the focus on the first search result

This change is aimed to solve https://bugs.kde.org/show_bug.cgi?id=410118

Test Plan

Press Ctrl+S.
Enter a search criteria that is not going to find any file.
Press Enter.
See an empty list.
Press Esc.


Press Ctrl+S.
Enter a search criteria that is going to find several files.
Press Enter.
See a populated list.
Press down arrow key to navigate through the results.
Press F3 (or F4) to see (or edit) a file.
Press Esc.
Press Esc.

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.
asensi requested review of this revision.Jul 23 2019, 6:38 AM
asensi created this revision.
nmel accepted this revision.Jul 28 2019, 6:12 AM

It works and I'm fine with the proposed fix. Thanks Toni!

It would be nice to understand why it worked before Alex's commit (per your comment in the bug) without explicitly setting the current item. The view classes are used in many UI lists and it might have broken other places...

This revision is now accepted and ready to land.Jul 28 2019, 6:12 AM
nmel added a comment.Jul 31 2019, 4:25 PM

If you'd like this fix to be included in v2.7.2, please push it to master by Aug 4 and I'll backport to stable. Please don't forget to specify BUG, FIXED, Differential Revision tags in the commit message.

This revision was automatically updated to reflect the committed changes.
asensi added a comment.Aug 1 2019, 8:41 PM

I think the same, Nikita, and thanks for testing and informing!

abika added a comment.Aug 4 2019, 3:04 PM

Hmm, when looking at my commit I cannot say what caused setting the "current" item before.
Anyway, thanks for fixing Toni!