================
@@ -138,19 +147,13 @@ CompletionsRequestHandler::Run(const CompletionsArguments
&args) const {
const StringRef match = matches.GetStringAtIndex(i);
const StringRef description = descriptions.GetStringAtIndex(i);
- StringRef match_ref = match;
- for (const StringRef commit_point : {".", "->"}) {
- if (const size_t pos = match_ref.rfind(commit_point);
- pos != StringRef::npos) {
- match_ref = match_ref.substr(pos + commit_point.size());
- }
- }
-
CompletionItem item;
- item.text = match_ref;
item.label = match;
if (!description.empty())
item.detail = description;
+ // lldb returned completions includes the partial typed token
+ // overwrite it.
+ item.length = partial_token_len;
targets.emplace_back(std::move(item));
}
----------------
adrian-prantl wrote:
I don't understand the context of this function so maybe this is okay, but the
behavior here is odd:
```
"abc def "
^
"abc def"
^
"abcdef"
^
```
Is that the intended behavior?
https://github.com/llvm/llvm-project/pull/177151
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits