summaryrefslogtreecommitdiff
path: root/src/layout/tree.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/tree.rs')
-rw-r--r--src/layout/tree.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/layout/tree.rs b/src/layout/tree.rs
index dfc1c464..df174544 100644
--- a/src/layout/tree.rs
+++ b/src/layout/tree.rs
@@ -1,6 +1,7 @@
//! Layouting of syntax trees.
-use super::line::{LineContext, LineLayouter};
+use std::rc::Rc;
+
use super::*;
use crate::shaping;
use crate::style::LayoutStyle;
@@ -9,7 +10,7 @@ use crate::syntax::{
};
use crate::{DynFuture, Feedback, Pass};
-/// Layout a syntax tree into a collection of boxes.
+/// Layout a syntax tree in a given context.
pub async fn layout_tree(tree: &SynTree, ctx: LayoutContext<'_>) -> Pass<MultiLayout> {
let mut layouter = TreeLayouter::new(ctx);
layouter.layout_tree(tree).await;
@@ -159,6 +160,7 @@ impl<'a> TreeLayouter<'a> {
style: &self.style,
spaces: self.layouter.remaining(),
root: false,
+ loader: Rc::clone(&self.ctx.loader),
..self.ctx
};