We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
String.sub text offsetStart (offsetEnd - offsetStart)
1 parent 028711a commit 03deb09Copy full SHA for 03deb09
analysis/src/CompletionFrontEnd.ml
@@ -869,7 +869,8 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor
869
match
870
(Pos.positionToOffset text posStart, Pos.positionToOffset text posEnd)
871
with
872
- | Some offsetStart, Some offsetEnd ->
+ | Some offsetStart, Some offsetEnd
873
+ when offsetStart >= 0 && offsetEnd >= offsetStart ->
874
(* Can't trust the parser's location
875
E.g. @foo. let x... gives as label @foo.let *)
876
let label =
0 commit comments