File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -555,25 +555,25 @@ let isCapitalized name =
555
555
let c = name.[0 ] in
556
556
match c with 'A' .. 'Z' -> true | _ -> false
557
557
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
561
561
| [] -> assert false
562
562
| [one] -> `Normal (Tip one)
563
563
| [one; two] when not (isCapitalized one) -> `Attribute ([one], two)
564
564
| [one; two] -> `Normal (Nested (one, Tip two))
565
565
| one :: rest -> (
566
566
if isCapitalized one then
567
- match loop (offset + String. length one + 1 ) rest with
567
+ match loop rest with
568
568
| `Normal path -> `Normal (Nested (one, path))
569
569
| x -> x
570
570
else
571
- match loop (offset + String. length one + 1 ) rest with
571
+ match loop rest with
572
572
| `Normal path -> `AbsAttribute path
573
573
| `Attribute (path , suffix ) -> `Attribute (one :: path, suffix)
574
574
| x -> x)
575
575
in
576
- loop 0 items
576
+ loop parts
577
577
578
578
(* Note: This is a hack. It will be wrong some times if you have a local thing
579
579
that overrides an open.
You can’t perform that action at this time.
0 commit comments