Skip to content

Commit

Permalink
pdf-annot: Fix: Render color only if it's defined.
Browse files Browse the repository at this point in the history
Free-text annotations do not have a color associated with them, which
causes annotation listing to crash (since the default value of
`pdf-annot-list-highlight-type` is now true). This bug was introduced
in bb0b71f
  • Loading branch information
vedang committed Dec 2, 2022
1 parent 1885cef commit c3c05e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lisp/pdf-annot.el
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ pretty-printed output."
(type
(let ((color (pdf-annot-get a 'color))
(type (pdf-annot-print-property a 'type)))
(if pdf-annot-list-highlight-type
(if (and pdf-annot-list-highlight-type color)
(propertize
type 'face
`(:background ,color
Expand Down

0 comments on commit c3c05e3

Please sign in to comment.