Skip to content

Commit

Permalink
Remove potential duplicates in consult-org-roam-buffer-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jgru committed Oct 8, 2022
1 parent 3d7c541 commit 3eee411
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions consult-org-roam-buffer.el
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
:items ,#'consult-org-roam-buffer--get-roam-bufs))

(defun consult-org-roam-buffer-setup ()
;; Remove potentially org-roam-buffer-source to avoid duplicate
(setq consult-buffer-sources
(delete 'org-roam-buffer-source consult-buffer-sources))
(if consult-org-roam-buffer-after-buffers
(let* ((idx (cl-position 'consult--source-buffer consult-buffer-sources :test 'equal))
(tail (nthcdr idx consult-buffer-sources)))
Expand Down

0 comments on commit 3eee411

Please sign in to comment.