Skip to content

Commit bb29048

Browse files
committed
revert change
1 parent 4a4a352 commit bb29048

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

analysis/src/CompletionBackEnd.ml

+9
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,15 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
14861486
in
14871487
decorators
14881488
|> List.filter (fun (decorator, _) -> Utils.startsWith decorator prefix)
1489+
|> List.map (fun (decorator, doc) ->
1490+
let parts = String.split_on_char '.' prefix in
1491+
let len = String.length prefix in
1492+
let dec2 =
1493+
if List.length parts > 1 then
1494+
String.sub decorator len (String.length decorator - len)
1495+
else decorator
1496+
in
1497+
(dec2, doc))
14891498
|> List.map mkDecorator
14901499
| CnamedArg (cp, prefix, identsSeen) ->
14911500
let labels =

analysis/tests/src/expected/Completion.res.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ Completable: Cdecorator(react.)
564564
Package opens Pervasives.JsxModules.place holder
565565
Resolved opens 1 pervasives
566566
[{
567-
"label": "react.component",
567+
"label": "component",
568568
"kind": 4,
569569
"tags": [],
570570
"detail": "",

0 commit comments

Comments
 (0)