Fix autocompletion after non-hashtag expression
This commit is contained in:
parent
4b0db52920
commit
8284db9000
@ -42,6 +42,7 @@ description: |
|
||||
- Fixed crash when [`symbol`]($func/symbol) function is called without arguments
|
||||
- Fixed access to label of certain content elements
|
||||
- Fixed line number in error message for CSV parsing
|
||||
- Fixed invalid autocompletion after certain markup elements
|
||||
|
||||
## March 28, 2023
|
||||
- **Breaking:** Enumerations now require a space after their marker, that is,
|
||||
|
@ -317,6 +317,8 @@ fn complete_field_accesses(ctx: &mut CompletionContext) -> bool {
|
||||
if ctx.leaf.range().end == ctx.cursor;
|
||||
if let Some(prev) = ctx.leaf.prev_sibling();
|
||||
if prev.is::<ast::Expr>();
|
||||
if prev.parent_kind() != Some(SyntaxKind::Markup) ||
|
||||
prev.prev_sibling_kind() == Some(SyntaxKind::Hashtag);
|
||||
if let Some(value) = analyze_expr(ctx.world, &prev).into_iter().next();
|
||||
then {
|
||||
ctx.from = ctx.cursor;
|
||||
|
Loading…
x
Reference in New Issue
Block a user