fix: completion de-duplication should not require LSP to send sort text
fixes #472
This commit is contained in:
parent
6603e60951
commit
721370d1ba
1 changed files with 3 additions and 2 deletions
|
|
@ -54,8 +54,9 @@ pub fn load_entries(self: *Type) !usize {
|
|||
if (!try cbor.matchValue(&iter, cbor.extract_cbor(&cbor_item))) return error.BadCompletion;
|
||||
const values = get_values(cbor_item);
|
||||
|
||||
if (existing.contains(values.sort_text)) continue;
|
||||
try existing.put(self.allocator, values.sort_text, {});
|
||||
const dup_text = if (values.sort_text.len > 0) values.sort_text else values.label;
|
||||
if (existing.contains(dup_text)) continue;
|
||||
try existing.put(self.allocator, dup_text, {});
|
||||
|
||||
if (self.value.replace == null) if (get_replace_selection(values.replace)) |replace| {
|
||||
self.value.replace = replace;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue