[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eat 8b3a38c1d5 2/2: Apply scaling and ascept ratio on Sixe
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eat 8b3a38c1d5 2/2: Apply scaling and ascept ratio on Sixel properly |
Date: |
Tue, 3 Oct 2023 16:00:04 -0400 (EDT) |
branch: elpa/eat
commit 8b3a38c1d566ae9bf8d12cee72282227a04dca2f
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Apply scaling and ascept ratio on Sixel properly
* eat.el (eat--set-term-sixel-params): Make sure both numbers
of char-dimension is non-zero.
---
eat.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/eat.el b/eat.el
index fcfe6bbf2d..34862c9492 100644
--- a/eat.el
+++ b/eat.el
@@ -5077,10 +5077,10 @@ selection, or nil if none."
(scale-y eat-sixel-scale)
(font-size (font-get (font-spec :name (face-font 'default))
:size)))
- (setf (car dimensions) (round (/ (car dimensions)
- (float scale-x))))
- (setf (cdr dimensions) (round (/ (cdr dimensions)
- (float scale-y))))
+ (setf (car dimensions) (max 1 (round (/ (car dimensions)
+ (float scale-x)))))
+ (setf (cdr dimensions) (max 1 (round (/ (cdr dimensions)
+ (float scale-y)))))
(setf (eat-term-parameter eat-terminal 'sixel-render-format)
render-fmt)
(setf (eat-term-parameter eat-terminal 'char-dimensions)