Skip to content

Commit

Permalink
Merge pull request #878 from zaeph/fix-narrowed
Browse files Browse the repository at this point in the history
Fix OOB problem with org-ref-delete-labels
  • Loading branch information
jkitchin committed May 10, 2021
2 parents 14e2e58 + db10bf5 commit 8aa2bb4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions org-ref-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -2033,9 +2033,11 @@ missing."
;; not perfect, this can be nil for anonyomous derived backends.
(when (and org-ref-labels
(not org-export-current-backend))
(if (eq start end)
(org-ref-delete-labels-insertion start end)
(org-ref-delete-labels-deletion start end)))
(save-restriction
(widen)
(if (eq start end)
(org-ref-delete-labels-insertion start end)
(org-ref-delete-labels-deletion start end))))
(when org-ref-label-debug
(message "end: %S" org-ref-labels)
(message "ordl end-----------------------------------------------------------------")))
Expand Down

0 comments on commit 8aa2bb4

Please sign in to comment.