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.Sun, Jul 28, 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.Sun, Jul 28, 6:12 AM
nmel added a comment.Wed, Jul 31, 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.Thu, Aug 1, 8:41 PM

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

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

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