diff options
| author | Matthew Toohey <contact@mtoohey.com> | 2024-04-01 16:22:54 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-01 20:22:54 +0000 |
| commit | dee8ccf04810ee4032fd28b366a4f796b7bf3062 (patch) | |
| tree | c1a93c99c762527e0181508037318ced1bd82e46 /crates/typst-ide/src/complete.rs | |
| parent | 16c3af7c92de97d14f52319bd375f842ce37a949 (diff) | |
Add side parameter to leaf_at (#3767)
Diffstat (limited to 'crates/typst-ide/src/complete.rs')
| -rw-r--r-- | crates/typst-ide/src/complete.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-ide/src/complete.rs b/crates/typst-ide/src/complete.rs index 4e4b8918..be28a431 100644 --- a/crates/typst-ide/src/complete.rs +++ b/crates/typst-ide/src/complete.rs @@ -10,7 +10,7 @@ use typst::foundations::{ }; use typst::model::Document; use typst::syntax::{ - ast, is_id_continue, is_id_start, is_ident, LinkedNode, Source, SyntaxKind, + ast, is_id_continue, is_id_start, is_ident, LinkedNode, Side, Source, SyntaxKind, }; use typst::text::RawElem; use typst::visualize::Color; @@ -1033,7 +1033,7 @@ impl<'a> CompletionContext<'a> { ) -> Option<Self> { let text = source.text(); let library = world.library(); - let leaf = LinkedNode::new(source.root()).leaf_at(cursor)?; + let leaf = LinkedNode::new(source.root()).leaf_at(cursor, Side::Before)?; Some(Self { world, document, |
