(fix)completion: ensure unique ref candidates (#2208)

Add invisible id to candidate strings to ensure each candidate is
unique, and completing-read doesn't get confused about which one to open.

Fix #2207
This commit is contained in:
Bruce D'Arcus
2022-06-05 16:53:29 -04:00
committed by GitHub
parent 83a0b3d464
commit 0cd9b9e6d3

View File

@@ -1006,8 +1006,10 @@ The car is the ref, and the cdr is the corresponding node for the ref."
:file file
:point pos
:title title)))
(cons (propertize ref 'node node 'type type)
node)))))
(cons
(concat (propertize ref 'node node 'type type)
(propertize id 'invisible t))
node)))))
(defun org-roam-ref-read--annotation (ref)
"Return the annotation for REF, which assumed to be a propertized string."