|
@@ -248,7 +248,12 @@ let parse ctx code file =
|
|
|
if l > 0 && s.[0] = '*' then last_doc := Some (String.sub s 1 (l - (if l > 1 && s.[l-1] = '*' then 2 else 1)), (snd tk).pmin);
|
|
|
tk
|
|
|
| CommentLine s ->
|
|
|
- if !in_display_file && display_position#enclosed_in (pos tk) then syntax_completion SCComment None (pos tk);
|
|
|
+ if !in_display_file then begin
|
|
|
+ let p = pos tk in
|
|
|
+ (* Completion at the / should not pick up the comment (issue #9133) *)
|
|
|
+ let p = if is_completion() then {p with pmin = p.pmin + 1} else p in
|
|
|
+ if display_position#enclosed_in p then syntax_completion SCComment None (pos tk);
|
|
|
+ end;
|
|
|
next_token()
|
|
|
| Sharp "end" ->
|
|
|
(match !mstack with
|