fix: Fix snippets triggering where they shouldn't

This commit is contained in:
Lukas Wirth 2022-05-06 15:44:41 +02:00
parent 582f99d293
commit 0ce620686c
10 changed files with 133 additions and 101 deletions

View file

@ -15,9 +15,12 @@ pub(crate) fn complete_expr_path(acc: &mut Completions, ctx: &CompletionContext)
}
let (&is_absolute_path, qualifier) = match &ctx.path_context {
Some(PathCompletionCtx { kind: PathKind::Expr, is_absolute_path, qualifier, .. }) => {
(is_absolute_path, qualifier)
}
Some(PathCompletionCtx {
kind: PathKind::Expr { .. },
is_absolute_path,
qualifier,
..
}) => (is_absolute_path, qualifier),
_ => return,
};