pass AppAction back to app

This commit is contained in:
alice pellerin
2026-03-19 03:38:19 -05:00
parent 0f11fb9273
commit 4f61f2fb93
5 changed files with 63 additions and 58 deletions
+12 -12
View File
@@ -20,18 +20,18 @@ impl App {
self.buffers
.iter()
.enumerate()
.map(|(index, buffer)| self.tab_for(buffer, index == self.current_buffer_index))
.map(|(index, buffer)| tab_for(buffer, index == self.current_buffer_index))
.collect()
}
fn tab_for(&self, buffer: &Buffer, is_active: bool) -> Span<'static> {
let background = if is_active {
Color::select_grey()
} else {
Color::ui_grey()
};
Span::from(format!(" {} ", buffer.file_name))
.bg(background)
}
}
fn tab_for(buffer: &Buffer, is_active: bool) -> Span<'static> {
let background = if is_active {
Color::select_grey()
} else {
Color::ui_grey()
};
Span::from(format!(" {} ", buffer.file_name))
.bg(background)
}