Skip to content

Commit 4fb4d80

Browse files
committed
cleanup
1 parent b8a0167 commit 4fb4d80

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

analysis/src/NewCompletions.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -555,25 +555,25 @@ let isCapitalized name =
555555
let c = name.[0] in
556556
match c with 'A' .. 'Z' -> true | _ -> false
557557

558-
let determineCompletion items =
559-
let rec loop offset items =
560-
match items with
558+
let determineCompletion parts =
559+
let rec loop parts =
560+
match parts with
561561
| [] -> assert false
562562
| [one] -> `Normal (Tip one)
563563
| [one; two] when not (isCapitalized one) -> `Attribute ([one], two)
564564
| [one; two] -> `Normal (Nested (one, Tip two))
565565
| one :: rest -> (
566566
if isCapitalized one then
567-
match loop (offset + String.length one + 1) rest with
567+
match loop rest with
568568
| `Normal path -> `Normal (Nested (one, path))
569569
| x -> x
570570
else
571-
match loop (offset + String.length one + 1) rest with
571+
match loop rest with
572572
| `Normal path -> `AbsAttribute path
573573
| `Attribute (path, suffix) -> `Attribute (one :: path, suffix)
574574
| x -> x)
575575
in
576-
loop 0 items
576+
loop parts
577577

578578
(* Note: This is a hack. It will be wrong some times if you have a local thing
579579
that overrides an open.

0 commit comments

Comments
 (0)