From dee8ccf04810ee4032fd28b366a4f796b7bf3062 Mon Sep 17 00:00:00 2001 From: Matthew Toohey Date: Mon, 1 Apr 2024 16:22:54 -0400 Subject: Add side parameter to leaf_at (#3767) --- crates/typst-ide/src/complete.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/typst-ide/src/complete.rs') 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 { 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, -- cgit v1.2.3