summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorVedang Manerikar <ved.manerikar@gmail.com>2022-12-02 12:45:06 +0530
committerVedang Manerikar <ved.manerikar@gmail.com>2022-12-02 12:45:06 +0530
commitc3c05e3bc564cd1a009d944e8002634ffcaf7376 (patch)
tree8639e96f2561eb10127294ca8b60c2da805a93a4 /lisp
parent1885cefc24883c220cdd4acafdf1d14f290a6979 (diff)
pdf-annot: Fix: Render color only if it's defined.
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 bb0b71f5bafd81d0b5647c4ec48fafa0bb6f6c21
Diffstat (limited to 'lisp')
-rw-r--r--lisp/pdf-annot.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/pdf-annot.el b/lisp/pdf-annot.el
index c82ed0c..7140e9a 100644
--- a/lisp/pdf-annot.el
+++ b/lisp/pdf-annot.el
@@ -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