Lines
100 %
Functions
50 %
Branches
//! The read-only pane of a template's draft.
use crate::event::Intent;
use tvui::RowWindow;
use crate::scroll;
#[derive(Debug)]
pub struct Draft {
pub lines: Vec<String>,
pub scroll: RowWindow,
}
impl Draft {
#[must_use]
pub fn new(lines: Vec<String>) -> Self {
Self {
lines,
scroll: RowWindow::default(),
pub fn scroll_by(&self, intent: Intent) {
let _ = scroll::apply(&self.scroll, intent);