diff --git a/um.el b/um.el index 5df885d..db8efe9 100644 --- a/um.el +++ b/um.el @@ -282,7 +282,9 @@ Negative prefix arg is handled by `um--tag-do', which see. (history-delete-duplicates t) ;; override sorting when deleting, because we sort the tags: (completions-sort (if insert completions-sort nil)) - (vertico-sort-function (if insert vertico-sort-function nil)) + (vertico-sort-function (if (and insert (bound-and-true-p vertico-sort-function)) + vertico-sort-function + nil)) (tag (completing-read prompt collection nil nil nil 'um-tags-history)))