summaryrefslogtreecommitdiff
path: root/library/src/layout/par.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/par.rs
parent6d64d3e8e9123f3fa8166c8b710e2b2c61ed5898 (diff)
Hover and autocomplete in show rules
Diffstat (limited to 'library/src/layout/par.rs')
-rw-r--r--library/src/layout/par.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/src/layout/par.rs b/library/src/layout/par.rs
index 1906dd7c..8657d7fb 100644
--- a/library/src/layout/par.rs
+++ b/library/src/layout/par.rs
@@ -1,3 +1,4 @@
+use typst::eval::Tracer;
use unicode_bidi::{BidiInfo, Level as BidiLevel};
use unicode_script::{Script, UnicodeScript};
use xi_unicode::LineBreakIterator;
@@ -138,6 +139,7 @@ impl ParNode {
fn cached(
par: &ParNode,
world: Tracked<dyn World>,
+ tracer: TrackedMut<Tracer>,
provider: TrackedMut<StabilityProvider>,
introspector: Tracked<Introspector>,
styles: StyleChain,
@@ -145,7 +147,7 @@ impl ParNode {
region: Size,
expand: bool,
) -> SourceResult<Fragment> {
- let mut vt = Vt { world, provider, introspector };
+ let mut vt = Vt { world, tracer, provider, introspector };
let children = par.children();
// Collect all text into one string for BiDi analysis.
@@ -166,6 +168,7 @@ impl ParNode {
cached(
self,
vt.world,
+ TrackedMut::reborrow_mut(&mut vt.tracer),
TrackedMut::reborrow_mut(&mut vt.provider),
vt.introspector,
styles,