]> cloud.milkyroute.net Git - dolphin.git/commit
kitemlistkeyboardsearchmanager: smarter search start position
authorYifan Zhu <fanzhuyifan@gmail.com>
Thu, 20 Feb 2025 18:35:06 +0000 (10:35 -0800)
committerYifan Zhu <fanzhuyifan@gmail.com>
Sat, 22 Feb 2025 22:26:57 +0000 (14:26 -0800)
commitb4dedc0d0df2c8b191192476d7787630180e51c7
tree095c84eee1c8e484b8d1ea1a568790c1aa6704fa
parent79d1f25ad14b1626c64d7f25c2fa16da0e2b2737
kitemlistkeyboardsearchmanager: smarter search start position

Search from the next position for new search and special repeated key search.
Otherwise search from the current position, which is current selected item if
something is selected or in selection mode, and 0 (the beginning) otherwise.

Test plan:
- create directory with files ab1, ab2, and ab3
- click ab2, and press escape to deselect
- type ab; verify that ab1 is selected
- wait a while, type ab again, verify that ab2 is selected
- wait a while, type ab again, verify that ab3 is selected
- click ab1, type ab, verify that ab2 is selected

BUG: 422951
src/kitemviews/kitemlistcontroller.cpp
src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp
src/kitemviews/private/kitemlistkeyboardsearchmanager.h
src/tests/kitemlistcontrollertest.cpp
src/tests/kitemlistkeyboardsearchmanagertest.cpp