more highlights, prevent overscroll

This commit is contained in:
🪞👃🪞 2025-03-03 18:39:21 +02:00
parent 2b855f43d7
commit b3a52c171b
3 changed files with 61 additions and 31 deletions

View file

@ -25,6 +25,8 @@ struct Taggart {
paths: Vec<Entry>,
cursor: usize,
offset: usize,
column: usize,
size: Measure<TuiOut>,
}
#[derive(Ord, Eq, PartialEq, PartialOrd, Default)]
struct Entry {
@ -64,6 +66,11 @@ impl Taggart {
}
let depth = entry.depth();
let path = entry.into_path();
let (is_dir, is_mus, is_img) = if path.is_dir() {
(true, false, false)
} else {
(false, false, false)
};
paths.push(Entry {
path: path.strip_prefix(&root)?.into(),
is_dir: path.is_dir(),
@ -78,6 +85,8 @@ impl Taggart {
paths,
cursor: 0,
offset: 0,
column: 0,
size: Measure::new(),
})
}
}