You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Focus can be stranded on a hidden file tree (missing tree_hidden guards) #16
Several key/mouse handlers set self.focus = Focus::Treewithout checking tree_hidden. When the file tree is hidden (via Shift+H or the show_file_tree = false startup default added in #15), these paths land focus on a panel that isn't rendered, leaving the user on an invisible pane until they blindly press a key to escape.
These are pre-existing (already reachable via the H toggle before #15) — surfaced during the #15 review. Deferred from #15 to keep that PR scoped to the visibility setting.
Affected sites (as of b816f56)
src/app/key_handlers.rs — Tab in viewer (:357), last-tab close from viewer (:365), search-Esc (:675), copy-menu Enter/Esc (:727/:731)
Add a small helper and route all of these through it:
/// Focus the tree, or the viewer if the tree is hidden.fnfocus_tree_or_viewer(&mutself){self.focus = ifself.tree_hidden{Focus::Viewer}else{Focus::Tree};}
Tests
Add focus-redirect tests for each entry point with tree_hidden = true asserting focus resolves to Focus::Viewer.
The file-tree focus fixes are now in a released build — install/upgrade via Homebrew (brew upgrade markdown-reader), cargo install markdown-tui-explorer, the AUR markdown-reader-bin package, or the prebuilt binaries on the release page.
Verified locally by the regression suite added with the fix (all green): watcher_rediscovery_preserves_user_tree_selection, tree_realigns_only_until_first_alignment, reveal_path_sets_aligned_only_on_a_real_match, and the per-entry-point *_respects_hidden_tree tests. Closing — please reopen if anything resurfaces.
Activity
refactor(tree): address review findings — explicit alignment latch, m…
release: markdown-tui-explorer 1.34.72
leboiko commentedon Jun 17, 2026
Fixed and shipped in v1.34.72 (via #20).
The file-tree focus fixes are now in a released build — install/upgrade via Homebrew (
brew upgrade markdown-reader),cargo install markdown-tui-explorer, the AURmarkdown-reader-binpackage, or the prebuilt binaries on the release page.Verified locally by the regression suite added with the fix (all green):
watcher_rediscovery_preserves_user_tree_selection,tree_realigns_only_until_first_alignment,reveal_path_sets_aligned_only_on_a_real_match, and the per-entry-point*_respects_hidden_treetests. Closing — please reopen if anything resurfaces.fix(tree): stop focus snapping to open file (leboiko#17); never stran…