Fix 'eat--set-term-sixel-params' on text display
* eat.el (eat--set-term-sixel-params): Don't error on text display.
This commit is contained in:
parent
5fd39f8bf0
commit
3294a118a7
1 changed files with 12 additions and 10 deletions
22
eat.el
22
eat.el
|
@ -5086,9 +5086,7 @@ selection, or nil if none."
|
||||||
('half-block '(1 . 2))
|
('half-block '(1 . 2))
|
||||||
(_ (cons (default-font-width) (default-font-height)))))
|
(_ (cons (default-font-width) (default-font-height)))))
|
||||||
(scale-x (* eat-sixel-aspect-ratio eat-sixel-scale))
|
(scale-x (* eat-sixel-aspect-ratio eat-sixel-scale))
|
||||||
(scale-y eat-sixel-scale)
|
(scale-y eat-sixel-scale))
|
||||||
(font-size (font-get (font-spec :name (face-font 'default))
|
|
||||||
:size)))
|
|
||||||
(setf (car dimensions) (max 1 (round (/ (car dimensions)
|
(setf (car dimensions) (max 1 (round (/ (car dimensions)
|
||||||
(float scale-x)))))
|
(float scale-x)))))
|
||||||
(setf (cdr dimensions) (max 1 (round (/ (cdr dimensions)
|
(setf (cdr dimensions) (max 1 (round (/ (cdr dimensions)
|
||||||
|
@ -5098,13 +5096,17 @@ selection, or nil if none."
|
||||||
(setf (eat-term-parameter eat-terminal 'char-dimensions)
|
(setf (eat-term-parameter eat-terminal 'char-dimensions)
|
||||||
dimensions)
|
dimensions)
|
||||||
(unless (memq render-fmt '(none background half-block))
|
(unless (memq render-fmt '(none background half-block))
|
||||||
(setf
|
(let ((font-size
|
||||||
(eat-term-parameter eat-terminal 'sixel-image-extra-properties)
|
(font-get (font-spec :name (face-font 'default))
|
||||||
`( :ascent center
|
:size)))
|
||||||
:height ,(cons (/ (float (default-font-height)) font-size)
|
(setf
|
||||||
'em)
|
(eat-term-parameter eat-terminal
|
||||||
:width ,(cons (/ (float (default-font-width)) font-size)
|
'sixel-image-extra-properties)
|
||||||
'em))))))
|
`( :ascent center
|
||||||
|
:height ,(cons (/ (float (default-font-height)) font-size)
|
||||||
|
'em)
|
||||||
|
:width ,(cons (/ (float (default-font-width)) font-size)
|
||||||
|
'em)))))))
|
||||||
|
|
||||||
(defun eat--set-cwd (_ host cwd)
|
(defun eat--set-cwd (_ host cwd)
|
||||||
"Set CWD as the current working directory (`default-directory').
|
"Set CWD as the current working directory (`default-directory').
|
||||||
|
|
Loading…
Add table
Reference in a new issue