hold text buffer

This commit is contained in:
yggverse 2024-12-16 12:39:21 +02:00
parent 2a3e4048ff
commit dc5bf1a400

View File

@ -38,6 +38,7 @@ const LINK_COLOR_DEFAULT: (f32, f32, f32, f32) = (53.0, 132.0, 228.0, 255.0);
const LINK_COLOR_ONHOVER: (f32, f32, f32, f32) = (53.0, 132.0, 228.0, 228.0);
pub struct Reader {
pub buffer: TextBuffer,
pub title: Option<String>,
pub widget: Rc<Widget>,
}
@ -459,7 +460,11 @@ impl Reader {
}); // @TODO may be expensive for CPU, add timeout?
// Result
Ok(Self { title, widget })
Ok(Self {
buffer,
title,
widget,
})
}
}