| Summary: | Type-ahead navigation does not find filenames beginning with the same character repeated twice | ||
|---|---|---|---|
| Product: | [Applications] dolphin | Reporter: | adrruiz |
| Component: | view-engine: general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | dolphin-bugs-null, john.kizer |
| Priority: | NOR | ||
| Version First Reported In: | 24.08.1 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/system/dolphin/-/commit/3858afbfa4f2f60cc33f39a471d36a1e1a3514c7 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
adrruiz
2025-03-21 21:58:55 UTC
Hi - I can reproduce on Fedora KDE 41, Dolphin 24.12.3. Thanks! A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/1085 Git commit 3858afbfa4f2f60cc33f39a471d36a1e1a3514c7 by Méven Car, on behalf of weinan li. Committed on 10/11/2025 at 08:38. Pushed by meven into branch 'master'. dolphin: improve keyboard search behavior for repeated characters The original keyboard search implementation had a limitation when dealing with files containing repeated characters like 44.txt. When typing 44, it would trigger rapid navigation to the next item starting with 4 instead of matching the full string 44. This patch introduces a smarter search strategy: 1. First attempt full string matching for exact file names 2. If full match fails and user is typing repeating characters, fall back to rapid navigation using either: - Last successful search string (for extended searches like 444 -> 4444) - First character only (original rapid navigation behavior) The changes include: - Modified changeCurrentItem signal to include a found parameter for search result feedback - Added m_lastSuccessfulSearch to track successful searches for better fallback behavior - Used Qt::DirectConnection to ensure synchronous execution for immediate result feedback This provides better user experience when searching for files with repeated characters while maintaining the rapid navigation feature for quick browsing. M +4 -2 src/kitemviews/kitemlistcontroller.cpp M +1 -1 src/kitemviews/kitemlistcontroller.h M +27 -11 src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp M +2 -1 src/kitemviews/private/kitemlistkeyboardsearchmanager.h M +109 -38 src/tests/kitemlistkeyboardsearchmanagertest.cpp https://invent.kde.org/system/dolphin/-/commit/3858afbfa4f2f60cc33f39a471d36a1e1a3514c7 |