summaryrefslogtreecommitdiffstats
path: root/src/preview.rs
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2022-10-09 22:02:10 +0200
committerqkzk <qu3nt1n@gmail.com>2022-10-09 22:02:10 +0200
commit9b32de9eb56aef7255469f875a1f1e24041a8872 (patch)
tree0cd8e7795b2b55cd0bf7025fcc51f45625ecaddd /src/preview.rs
parent6e2c8837dc045ed99401b851c41ce88347703d57 (diff)
refactor display
Diffstat (limited to 'src/preview.rs')
-rw-r--r--src/preview.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/preview.rs b/src/preview.rs
index 169850c..b90cd8d 100644
--- a/src/preview.rs
+++ b/src/preview.rs
@@ -108,14 +108,14 @@ impl TextContent {
#[derive(Clone)]
pub struct SyntaxedContent {
- pub highlighted_content: Box<Vec<Vec<SyntaxedString>>>,
+ pub content: Box<Vec<Vec<SyntaxedString>>>,
length: usize,
}
impl Default for SyntaxedContent {
fn default() -> Self {
Self {
- highlighted_content: Box::new(vec![vec![]]),
+ content: Box::new(vec![vec![]]),
length: 0,
}
}
@@ -150,12 +150,12 @@ impl SyntaxedContent {
Self {
length: highlighted_content.len(),
- highlighted_content,
+ content: highlighted_content,
}
}
pub fn reset(&mut self) {
- self.highlighted_content = Box::new(vec![vec![]])
+ self.content = Box::new(vec![vec![]])
}
fn len(&self) -> usize {