From f9a13cd7ca806a164079c8ca904dbdfa2faefdf8 Mon Sep 17 00:00:00 2001 From: xonix Date: Sun, 17 Dec 2023 16:12:28 +0200 Subject: [PATCH] Should autocomplete variable in this case #207 --- src/main/java/intellij_awk/psi/AwkUserVarNameMixin.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/intellij_awk/psi/AwkUserVarNameMixin.java b/src/main/java/intellij_awk/psi/AwkUserVarNameMixin.java index 4c6df4e..b981766 100644 --- a/src/main/java/intellij_awk/psi/AwkUserVarNameMixin.java +++ b/src/main/java/intellij_awk/psi/AwkUserVarNameMixin.java @@ -172,6 +172,9 @@ public boolean isInsideInitializingContext() { } public boolean isALocalVariableInAFunction() { + if (getParent() instanceof AwkParamList) { // function (here) {} + return true; + } AwkAction action = PsiTreeUtil.getTopmostParentOfType(this, AwkAction.class); if (action == null) { return false;