lsv 0.1.15

Three‑pane terminal file viewer (TUI) with preview and Lua configuration
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Reselect the item with the given name in the current entries, if present.
pub fn reselect_by_name(
    app: &mut crate::app::App,
    name: &str,
)
{
    if let Some(idx) = app.current_entries.iter().position(|e| e.name == name)
    {
        app.list_state.select(Some(idx));
    }
}