diff --git a/containers b/containers index c9853bb..cb261d4 160000 --- a/containers +++ b/containers @@ -1 +1 @@ -Subproject commit c9853bbca9f0840df32a46edebbb9b17c8216cd4 +Subproject commit cb261d4e4e7802271c9d4275732b092b031a03c4 diff --git a/dsymbol b/dsymbol index 86cf39c..3fef31c 160000 --- a/dsymbol +++ b/dsymbol @@ -1 +1 @@ -Subproject commit 86cf39c41e3173818a3ad9aa60bb253f0da26523 +Subproject commit 3fef31ccdf3301345685110b54d7092750b630ee diff --git a/libdparse b/libdparse index bafe4e1..04d176b 160000 --- a/libdparse +++ b/libdparse @@ -1 +1 @@ -Subproject commit bafe4e155657319349f4afa76768fe8981ca43b1 +Subproject commit 04d176b699ffbcf755eff7276ddf989e6c35aaac diff --git a/src/server/autocomplete.d b/src/server/autocomplete.d index d0e9c95..cc76f1b 100644 --- a/src/server/autocomplete.d +++ b/src/server/autocomplete.d @@ -48,6 +48,8 @@ import dsymbol.builtin.symbols; import common.constants; import common.messages; +import containers.hashset; + /** * Gets documentation for the symbol at the cursor * Params: @@ -226,10 +228,11 @@ public AutocompleteResponse symbolSearch(const AutocompleteRequest request, } SearchResults results; + HashSet!size_t visited; foreach (symbol; pair.scope_.symbols) - symbol.getAllPartsNamed(request.searchName, results); + symbol.getParts!SearchResults(internString(request.searchName), results, visited); foreach (s; moduleCache.getAllSymbols()) - s.symbol.getAllPartsNamed(request.searchName, results); + s.symbol.getParts!SearchResults(internString(request.searchName), results, visited); AutocompleteResponse response; foreach (result; results.tree[]) @@ -1075,7 +1078,7 @@ body { string generatedStructConstructorCalltip = "this("; const(DSymbol)*[] fields = symbol.opSlice().filter!( - a => a.kind == CompletionKind.variableName).map!(a => cast(const(DSymbol)*) a.ptr).array(); + a => a.kind == CompletionKind.variableName).map!(a => cast(const(DSymbol)*) a).array(); fields.sort!((a, b) => a.location < b.location); foreach (i, field; fields) { diff --git a/tests/imports/a.d b/tests/imports/a.d index 0264baa..5ce4cae 100644 --- a/tests/imports/a.d +++ b/tests/imports/a.d @@ -1,3 +1,5 @@ module a; -public import b; +public { + import b; +} string FOO;