fix: remove completion de-duplication
Now that requests cannot overlap any duplicates are actually from the LSP. Deduplication was not working correctly for some LSPs so we just remove it now.
This commit is contained in:
parent
8c8388c0c2
commit
7a3b8e3fce
2 changed files with 0 additions and 14 deletions
|
|
@ -52,9 +52,6 @@ pub fn load_entries(self: *Type) !usize {
|
|||
max_description = 0;
|
||||
var max_label_len: usize = 0;
|
||||
|
||||
var existing: std.StringHashMapUnmanaged(void) = .empty;
|
||||
defer existing.deinit(self.allocator);
|
||||
|
||||
self.value.query = null;
|
||||
var iter: []const u8 = self.value.editor.completions.data.items;
|
||||
while (iter.len > 0) {
|
||||
|
|
@ -62,10 +59,6 @@ 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);
|
||||
|
||||
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.query == null) if (get_query_selection(self.value.editor, values)) |query| {
|
||||
self.value.query = query;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,9 +42,6 @@ pub fn load_entries(palette: *Type) !usize {
|
|||
max_description = 0;
|
||||
var max_label_len: usize = 0;
|
||||
|
||||
var existing: std.StringHashMapUnmanaged(void) = .empty;
|
||||
defer existing.deinit(palette.allocator);
|
||||
|
||||
const editor = tui.get_active_editor() orelse return error.NotFound;
|
||||
palette.value.start = editor.get_primary().*;
|
||||
var iter: []const u8 = editor.completions.data.items;
|
||||
|
|
@ -53,10 +50,6 @@ pub fn load_entries(palette: *Type) !usize {
|
|||
if (!try cbor.matchValue(&iter, cbor.extract_cbor(&cbor_item))) return error.BadCompletion;
|
||||
const values = get_values(cbor_item);
|
||||
|
||||
const dup_text = if (values.sort_text.len > 0) values.sort_text else values.label;
|
||||
if (existing.contains(dup_text)) continue;
|
||||
try existing.put(palette.allocator, dup_text, {});
|
||||
|
||||
if (palette.value.query == null) if (get_query_selection(editor, values)) |query| {
|
||||
palette.value.query = query;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue