feat(fm): MC-style keyboard cursor + function-key bar (FM increment A)#27
Merged
Conversation
The integrated file manager becomes keyboard-drivable like Midnight Commander — the first half of making it usable the MC way. - keynav.rs: pure, unit-tested cursor arithmetic (Up/Down/First/Last/ Page, clamp), no wrapping, empty-list safe, stale-cursor safe. - A `cursor` distinct from the multi-selection set: a single accent-bar row (inverse video, MC's cyan cursor) rendered by file_list. Arrow keys move it; Enter/Right open or enter; Left/Backspace go up; Space toggles selection; Home/End/PageUp/PageDown jump. The cursor is the single source of truth with the rendered rows (shared visible_indices) and re-clamps after every refresh/filter/navigation. - Function-key footer (F3 View · F4 Edit · F5 Copy · F6 Rename · F7 MkDir · F8 Delete · F10 Quit), mirroring the physical F-keys and clickable for mouse users. F5/F6 copy/move to *another* file panel is the next increment (registry + transfer engine); pressing them today says so plainly rather than doing nothing. Verified: cargo check -p warp 0/0; 236 sftp tests + 6 keynav tests green (5 new view-level cursor/filter tests). No build triggered. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First increment toward using the integrated file manager the Midnight Commander way — the keyboard/interaction core.
What lands
keynav.rs— pure, unit-tested cursor arithmetic (Up/Down/First/Last/Page + clamp): no wrapping, empty-list safe, stale-cursor safe.visible_indices()source of truth with the rendered rows and re-clamps after every refresh/filter/navigation.Honest scope: F5/F6 copy/move into another file panel (the defining MC operation) is the next increment — it needs the FM-pane registry + a copy primitive/transfer engine. Pressing F5/F6 today says so plainly rather than silently doing nothing. This PR makes a single panel fully keyboard-drivable; the two-panel copy/move follows.
Verified:
cargo check -p warp0 errors/0 warnings; 236 sftp tests + 6 keynav tests green (incl. 5 new view-level cursor/filter tests). No build triggered (per the standing no-build-without-substantial-progress rule).🤖 Generated with Claude Code