mirror of
https://github.com/zaphar/sheetsui.git
synced 2025-07-22 13:00:22 -04:00
wip: ui: show the sheet index in the tab
This commit is contained in:
parent
6884aa0501
commit
ae8366b16e
@ -28,7 +28,7 @@ impl<'ws> Workspace<'ws> {
|
||||
];
|
||||
let mut rs: Vec<Box<dyn Fn(Rect, &mut Buffer, &mut Self)>> = vec![
|
||||
Box::new(|rect: Rect, buf: &mut Buffer, ws: &mut Self| {
|
||||
let tabs = Tabs::new(ws.book.get_sheet_names())
|
||||
let tabs = Tabs::new(ws.book.get_sheet_names().iter().enumerate().map(|(idx, name)| format!("{} {}", name, idx)).collect::<Vec<String>>())
|
||||
.select(Some(ws.book.current_sheet as usize));
|
||||
tabs.render(rect, buf);
|
||||
}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user