Skip to content

rust-explorer: typing a name in the list selects the matching row (#130) - #167

Closed
GuilhermeProvenci wants to merge 1 commit into
Lemxy:mainfrom
GuilhermeProvenci:fix/explorer-type-ahead
Closed

GuilhermeProvenci wants to merge 1 commit into
Lemxy:mainfrom
GuilhermeProvenci:fix/explorer-type-ahead

Conversation

@GuilhermeProvenci

Copy link
Copy Markdown
Contributor

Fixes #130.

Problem. In the file manager, typing the start of a name does not go to that item: every letter lands on the first row.

Cause. The folder list is a virtual list view (LVS_OWNERDATA), so the control has no items of its own to search. It asks its parent with LVN_ODFINDITEM, and nothing answered it, so the answer was always row 0.

Fix. find_row answers the notification: the first row at or after the current one whose name begins with what was typed, case ignored, wrapping round to the top. The date-group heading rows (Group by date) never match. No match returns -1, so the selection stays where it is.

Test. cargo test -p rust-explorer (new typing_a_name_finds_the_row_not_the_first_one: first letter, case, start row and wrap, accents, no match, empty, stale start row). By hand: open a folder, type the first letters of a name; typing quickly keeps extending the prefix (the list view does that).

I have not tested the desktop view (it is not virtual and the list view handles it itself) or a folder with thousands of rows.

🤖 Generated with Claude Code

…mxy#130)

The folder list is virtual (LVS_OWNERDATA), so the list view has no items of its own to search and asks the parent with
LVN_ODFINDITEM. Nothing answered, and every typed letter landed on the first row.

find_row answers it: the first row at or after the current one whose name starts with what was typed, case ignored, wrapping
round to the top; the date-group heading rows never match. -1 (no match) leaves the selection where it is.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Lemxy added a commit that referenced this pull request Nov 26, 2026
Fixes: Alt+Tab ignores a still pointer (#183, #116); Performance page details visible in a narrow window (#170); type-ahead in rust-explorer (#130, from PR #167 by GuilhermeProvenci); rs-shell waits for the autostart before ending Explorer (#159, from PR #161 by Tkyoxx); WinRust is listed in Installed apps (#178).

New: quick settings tiles for Mobile hotspot, Night light, Project and a media card (#176, #166); Restart / Shut down on the bar (#173); Win+V clipboard history (#171); window magnet (#133); folder sizes (#147), double click on empty space goes up (#139), "Folders first" switch and a Sort by menu (#162).
@Lemxy

Lemxy commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Thank you, @GuilhermeProvenci! Your change is in main (squashed, credited in the commit message) and released in v0.5.9.

@Lemxy Lemxy closed this Nov 26, 2026
Lemxy added a commit that referenced this pull request Nov 26, 2026
…#182

Co-authored-by: 2sulraw <2sulraw@gmail.com>
Co-authored-by: Tkyo0x <240800669+Tkyoxx@users.noreply.github.com>
Co-authored-by: GuilhermeLima <guilhermelimamp2020@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typing into Explorer doesn't take you to the folder you typed.

2 participants