fix: apply completion de-duplication fix to completion_palette too
This commit is contained in:
parent
4847a1f584
commit
38e681f7bf
1 changed files with 3 additions and 2 deletions
|
|
@ -49,8 +49,9 @@ pub fn load_entries(palette: *Type) !usize {
|
||||||
if (!try cbor.matchValue(&iter, cbor.extract_cbor(&cbor_item))) return error.BadCompletion;
|
if (!try cbor.matchValue(&iter, cbor.extract_cbor(&cbor_item))) return error.BadCompletion;
|
||||||
const values = get_values(cbor_item);
|
const values = get_values(cbor_item);
|
||||||
|
|
||||||
if (existing.contains(values.sort_text)) continue;
|
const dup_text = if (values.sort_text.len > 0) values.sort_text else values.label;
|
||||||
try existing.put(palette.allocator, values.sort_text, {});
|
if (existing.contains(dup_text)) continue;
|
||||||
|
try existing.put(palette.allocator, dup_text, {});
|
||||||
|
|
||||||
if (palette.value.replace == null) if (get_replace_selection(values.replace)) |replace| {
|
if (palette.value.replace == null) if (get_replace_selection(values.replace)) |replace| {
|
||||||
palette.value.replace = replace;
|
palette.value.replace = replace;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue