tangled
alpha
login
or
join now
jon.recoil.org
/
js_top_worker
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
Fix autocomplete
jon.recoil.org
6 months ago
271bde29
73a26cf1
+5
-2
1 changed file
expand all
collapse all
unified
split
lib
impl.ml
+5
-2
lib/impl.ml
···
61
List.map (fun id -> Printf.sprintf "open %s" (modname_of_id id)) deps
62
|> String.concat " "
63
in
64
-
let line1 = line1 ^ ";;\n" in
65
Logs.debug (fun m -> m "Line1: %s\n%!" line1);
66
Logs.debug (fun m -> m "Source: %s\n%!" src);
67
if is_mangled_broken orig_source src then (
···
764
try
765
let line1, src = mangle_toplevel is_toplevel source [] in
766
let src = line1 ^ src in
0
0
767
let source = Merlin_kernel.Msource.make src in
768
let map_kind :
769
[ `Value
···
807
})
808
compl.entries
809
in
810
-
IdlM.ErrM.return { Toplevel_api_gen.from; to_; entries }
0
811
| None ->
812
IdlM.ErrM.return { Toplevel_api_gen.from = 0; to_ = 0; entries = [] }
813
with e ->
···
61
List.map (fun id -> Printf.sprintf "open %s" (modname_of_id id)) deps
62
|> String.concat " "
63
in
64
+
let line1 = if line1 <> "" then line1 ^ ";;\n" else "" in
65
Logs.debug (fun m -> m "Line1: %s\n%!" line1);
66
Logs.debug (fun m -> m "Source: %s\n%!" src);
67
if is_mangled_broken orig_source src then (
···
764
try
765
let line1, src = mangle_toplevel is_toplevel source [] in
766
let src = line1 ^ src in
767
+
Logs.info (fun m -> m "line1: '%s' (length: %d)" line1 (String.length line1));
768
+
769
let source = Merlin_kernel.Msource.make src in
770
let map_kind :
771
[ `Value
···
809
})
810
compl.entries
811
in
812
+
let l1l = String.length line1 in
813
+
IdlM.ErrM.return { Toplevel_api_gen.from = from - l1l; to_ = to_ - l1l; entries }
814
| None ->
815
IdlM.ErrM.return { Toplevel_api_gen.from = 0; to_ = 0; entries = [] }
816
with e ->