@@ -911,8 +911,9 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor ~text =
911
911
&& charBeforeCursor = Some ')' ) -> (
912
912
(* Complete fn argument values and named args when the fn call is piped. E.g. someVar->someFn(<com>). *)
913
913
let args = extractExpApplyArgs ~args in
914
+ let funCtxPath = exprToContextPath funExpr in
914
915
let argCompletable =
915
- match exprToContextPath funExpr with
916
+ match funCtxPath with
916
917
| Some contextPath ->
917
918
findArgCompletables ~context Path ~args
918
919
~end Pos:(Loc. end_ expr.pexp_loc) ~pos BeforeCursor
@@ -923,7 +924,7 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor ~text =
923
924
in
924
925
match argCompletable with
925
926
| None -> (
926
- match exprToContextPath funExpr with
927
+ match funCtxPath with
927
928
| None -> ()
928
929
| Some funCtxPath ->
929
930
let oldCtxPath = ! currentCtxPath in
@@ -955,8 +956,9 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor ~text =
955
956
(Loc. toString exp.pexp_loc))
956
957
|> String. concat " , " );
957
958
959
+ let funCtxPath = exprToContextPath funExpr in
958
960
let argCompletable =
959
- match exprToContextPath funExpr with
961
+ match funCtxPath with
960
962
| Some contextPath ->
961
963
findArgCompletables ~context Path ~args
962
964
~end Pos:(Loc. end_ expr.pexp_loc) ~pos BeforeCursor
@@ -967,7 +969,7 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor ~text =
967
969
in
968
970
match argCompletable with
969
971
| None -> (
970
- match exprToContextPath funExpr with
972
+ match funCtxPath with
971
973
| None -> ()
972
974
| Some funCtxPath ->
973
975
let oldCtxPath = ! currentCtxPath in
0 commit comments