use crate::widgets::markdown_widget::foundation::elements::CodeBlockTheme;
use ratatui::text::Line;
#[derive(Debug, Clone)]
pub struct RenderCache {
pub content_hash: u64,
pub width: usize,
pub show_line_numbers: bool,
pub theme: CodeBlockTheme,
pub app_theme_hash: u64,
pub show_heading_collapse: bool,
pub lines: Vec<Line<'static>>,
pub line_boundaries: Vec<(usize, usize)>,
}
impl RenderCache {
#[allow(clippy::too_many_arguments)]
pub fn new(
content_hash: u64,
width: usize,
show_line_numbers: bool,
theme: CodeBlockTheme,
app_theme_hash: u64,
show_heading_collapse: bool,
lines: Vec<Line<'static>>,
line_boundaries: Vec<(usize, usize)>,
) -> Self {
Self {
content_hash,
width,
show_line_numbers,
theme,
app_theme_hash,
show_heading_collapse,
lines,
line_boundaries,
}
}
}