summaryrefslogtreecommitdiff
path: root/crates/typst-ide
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-05-22 11:26:03 +0200
committerGitHub <noreply@github.com>2024-05-22 09:26:03 +0000
commita52987a8c26bc13e3db4cc300b8cd9d81eb8a18d (patch)
treeb6eeb1aeb07ead2b60acfcf99562f16dd53ba7b1 /crates/typst-ide
parenta24052cb80e8a86695ac73e00281d5df0b9317c9 (diff)
Refactor frame metadata into tags (#4212)
Diffstat (limited to 'crates/typst-ide')
-rw-r--r--crates/typst-ide/src/jump.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/typst-ide/src/jump.rs b/crates/typst-ide/src/jump.rs
index 7c3c7569..45186d5b 100644
--- a/crates/typst-ide/src/jump.rs
+++ b/crates/typst-ide/src/jump.rs
@@ -1,7 +1,6 @@
use std::num::NonZeroUsize;
use ecow::EcoString;
-use typst::introspection::Meta;
use typst::layout::{Frame, FrameItem, Point, Position, Size};
use typst::model::{Destination, Document};
use typst::syntax::{FileId, LinkedNode, Side, Source, Span, SyntaxKind};
@@ -37,7 +36,7 @@ pub fn jump_from_click(
) -> Option<Jump> {
// Try to find a link first.
for (pos, item) in frame.items() {
- if let FrameItem::Meta(Meta::Link(dest), size) = item {
+ if let FrameItem::Link(dest, size) = item {
if is_in_rect(*pos, *size, click) {
return Some(match dest {
Destination::Url(url) => Jump::Url(url.clone()),