emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/telephone-line c0363af166 176/195: Add height to the hash


From: ELPA Syncer
Subject: [nongnu] elpa/telephone-line c0363af166 176/195: Add height to the hash key to automatically handle font size changes
Date: Wed, 5 Jan 2022 02:59:56 -0500 (EST)

branch: elpa/telephone-line
commit c0363af1662ce8241a2cc15bdeb26c70e0ca012a
Author: Daniel Bordak <dbordak@fastmail.fm>
Commit: Daniel Bordak <dbordak@fastmail.fm>

    Add height to the hash key to automatically handle font size changes
---
 telephone-line-utils.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/telephone-line-utils.el b/telephone-line-utils.el
index f7fed7c5db..198c91ba3e 100644
--- a/telephone-line-utils.el
+++ b/telephone-line-utils.el
@@ -220,7 +220,8 @@ Includes padding."
 (cl-defmethod telephone-line-separator-render-image ((obj 
telephone-line-separator) foreground background)
   "Find cached pbm of OBJ in FOREGROUND and BACKGROUND.
 If it doesn't exist, create and cache it."
-  (let ((hash-key (concat background "_" foreground)))
+  (let* ((height (telephone-line-separator-height obj))
+         (hash-key (format "%s_%s_%s" background foreground height)))
     ;; Return cached image if we have it.
     (or (gethash hash-key (oref obj image-cache))
         (puthash hash-key



reply via email to

[Prev in Thread] Current Thread [Next in Thread]