summaryrefslogtreecommitdiff
path: root/crates/typst-ide/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-01-17 21:50:35 +0100
committerLaurenz <laurmaedje@gmail.com>2024-01-17 21:53:20 +0100
commit6ac71eeaf7b68dab07f75bd1a480810481fa9b73 (patch)
treed452e7323200fe56d61a34b91c8b98826d60978c /crates/typst-ide/src
parent50741209a8f4c5e91d35281eb44b7425b3d022b2 (diff)
Add `Page` struct
To get rid of the Meta hack where numbering and things like that are stored in the frame.
Diffstat (limited to 'crates/typst-ide/src')
-rw-r--r--crates/typst-ide/src/jump.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-ide/src/jump.rs b/crates/typst-ide/src/jump.rs
index f1128878..c8b7343a 100644
--- a/crates/typst-ide/src/jump.rs
+++ b/crates/typst-ide/src/jump.rs
@@ -121,8 +121,8 @@ pub fn jump_from_cursor(
}
let span = node.span();
- for (i, frame) in document.pages.iter().enumerate() {
- if let Some(pos) = find_in_frame(frame, span) {
+ for (i, page) in document.pages.iter().enumerate() {
+ if let Some(pos) = find_in_frame(&page.frame, span) {
return Some(Position {
page: NonZeroUsize::new(i + 1).unwrap(),
point: pos,