From cd429d75b624f240cdd76fff0c037ec0730f66dd Mon Sep 17 00:00:00 2001 From: Siemargl Date: Thu, 17 Sep 2020 10:42:02 +0300 Subject: [PATCH] Upgrade depencies to latest DCD & DlangUI --- dub.json | 5 ++--- src/dlangide/tools/d/dcdinterface.d | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dub.json b/dub.json index d92e674..ddb73e9 100644 --- a/dub.json +++ b/dub.json @@ -12,9 +12,8 @@ "stringImportPaths": ["views"], "dependencies": { - "dlangui": "==0.9.182", - "dsymbol": "~>0.4.8", - "dcd": "~>0.9.13" + "dlangui": "==0.9.186", + "dcd": "~>0.13.1" }, "copyFiles-windows": [ diff --git a/src/dlangide/tools/d/dcdinterface.d b/src/dlangide/tools/d/dcdinterface.d index 8f6677d..3b1349f 100644 --- a/src/dlangide/tools/d/dcdinterface.d +++ b/src/dlangide/tools/d/dcdinterface.d @@ -238,7 +238,9 @@ class DCDInterface : Thread { override void performRequest() { AutocompleteResponse response = getDoc(request, *getModuleCache(_importPaths)); - result.docComments = response.docComments.dup; + foreach (ref completion; response.completions) + result.docComments ~= completion.documentation.escapeConsoleOutputString(true); + result.result = DCDResult.SUCCESS; debug(DCD) Log.d("DCD doc comments:\n", result.docComments); @@ -318,10 +320,7 @@ class DCDInterface : Thread { result.output.length = response.completions.length; int i=0; foreach(s;response.completions) { - char type = 0; - if (i < response.completionKinds.length) - type = response.completionKinds[i]; - result.output[i].kind = type; + result.output[i].kind = s.kind; result.output[i].name = to!dstring(s); i++; }