summaryrefslogtreecommitdiff
path: root/library/src/layout/list.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-17 16:27:40 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-17 18:18:47 +0100
commitaf7fe4d76083c597ec2198a73383b9e3899d75ea (patch)
treecb3b9766ee15dbfbecf7f9b9a2257859d7a7b3c7 /library/src/layout/list.rs
parent6d64d3e8e9123f3fa8166c8b710e2b2c61ed5898 (diff)
Hover and autocomplete in show rules
Diffstat (limited to 'library/src/layout/list.rs')
-rw-r--r--library/src/layout/list.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/library/src/layout/list.rs b/library/src/layout/list.rs
index c954ab67..fe78131d 100644
--- a/library/src/layout/list.rs
+++ b/library/src/layout/list.rs
@@ -128,7 +128,7 @@ impl Layout for ListNode {
};
let depth = self.depth(styles);
- let marker = self.marker(styles).resolve(vt.world, depth)?;
+ let marker = self.marker(styles).resolve(vt, depth)?;
let mut cells = vec![];
for item in self.children() {
@@ -181,17 +181,14 @@ pub enum ListMarker {
impl ListMarker {
/// Resolve the marker for the given depth.
- fn resolve(&self, world: Tracked<dyn World>, depth: usize) -> SourceResult<Content> {
+ fn resolve(&self, vt: &mut Vt, depth: usize) -> SourceResult<Content> {
Ok(match self {
Self::Content(list) => list
.get(depth)
.or(list.last())
.cloned()
.unwrap_or_else(|| TextNode::packed('•')),
- Self::Func(func) => {
- let args = Args::new(func.span(), [Value::Int(depth as i64)]);
- func.call_detached(world, args)?.display()
- }
+ Self::Func(func) => func.call_vt(vt, [Value::Int(depth as i64)])?.display(),
})
}
}