Support Sixel properly in Eshell

* eat.el (eat--eshell-setup-proc-and-term): Set Sixel
attributes of the terminal object.
This commit is contained in:
Akib Azmain Turja 2023-08-27 01:39:12 +06:00
parent 6b5eafb31a
commit 79a5c2dc94
No known key found for this signature in database
GPG key ID: 5535FCF54D88616B

15
eat.el
View file

@ -6468,6 +6468,21 @@ PROGRAM can be a shell command."
(setf (eat-term-ring-bell-function eat--terminal) #'eat--bell)
(setf (eat-term-set-cwd-function eat--terminal) #'eat--set-cwd)
(setf (eat-term-set-cmd-function eat--terminal) #'eat--set-cmd)
(setf (eat-term-parameter eat--terminal 'sixel-display-method)
(cond ((and (display-graphic-p)
(image-type-available-p 'svg))
'svg)
((char-displayable-p ?▄) 'half-block)
(t 'background)))
(when (display-graphic-p)
(setf (eat-term-parameter eat--terminal 'sixel-image-height)
(cons (/ (float (default-font-height))
(font-get
(font-spec :name (face-font 'default))
:size))
'em)))
(setf (eat-term-parameter eat--terminal 'char-dimensions)
(cons (default-font-width) (default-font-height)))
(setf (eat-term-parameter eat--terminal 'eat--process) proc)
(unless (>= emacs-major-version 29)
(setf (eat-term-parameter eat--terminal 'eat--input-process)