diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-11-30 19:09:42 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-11-30 19:09:42 +0100 |
| commit | 293a7154435a85021e5f5f2e87f881e9810137fc (patch) | |
| tree | 2efed738fde948b8f2bca700fafc974935beaf2a | |
| parent | f16a9ea9ad362b71d37774870080f5b6545e4f2f (diff) | |
Adjust signature of `jump_from_cursor`
| -rw-r--r-- | crates/typst-ide/src/jump.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-ide/src/jump.rs b/crates/typst-ide/src/jump.rs index 8612ffc3..f1128878 100644 --- a/crates/typst-ide/src/jump.rs +++ b/crates/typst-ide/src/jump.rs @@ -111,7 +111,7 @@ pub fn jump_from_click( /// Find the output location in the document for a cursor position. pub fn jump_from_cursor( - frames: &[Frame], + document: &Document, source: &Source, cursor: usize, ) -> Option<Position> { @@ -121,7 +121,7 @@ pub fn jump_from_cursor( } let span = node.span(); - for (i, frame) in frames.iter().enumerate() { + for (i, frame) in document.pages.iter().enumerate() { if let Some(pos) = find_in_frame(frame, span) { return Some(Position { page: NonZeroUsize::new(i + 1).unwrap(), |
