refactor(tui): trim the folder column change to what it needs

The path splitter is a one-line stdlib call with a single caller, so it
lives beside that caller as a private fn, without its own tests. The pane
tests assert the two columns in one screen fragment each, the end-offset
test keeps only the two cases the existing name tests do not cover, and
the key-handling test that repeated one of them goes. The website mock
splits on the backslash the same way its Info pane already does.
This commit is contained in:
Michel de Graaf
2026-09-08 05:59:39 +00:00
parent da371d4176
commit 2733ee26f7
4 changed files with 22 additions and 61 deletions
-12
View File
@@ -1274,18 +1274,6 @@ mod tests {
);
}
#[test]
fn scrolling_runs_to_the_end_of_the_folder_when_it_is_the_longer() {
let mut tui = results_tui(3);
tui.state.results_items[1].filename =
format!("{}\\short.mp3", "f".repeat(20));
tui.state.results_table_state.select(Some(1));
press(&mut tui, KeyCode::Char('$'));
assert_eq!(tui.state.results_name_offset, 14);
press(&mut tui, KeyCode::Char('l'));
assert_eq!(tui.state.results_name_offset, 14, "stops at the end");
}
#[test]
fn picking_another_search_starts_its_results_unscrolled() {
let mut tui = results_tui(3);