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:
parent
6b5eafb31a
commit
79a5c2dc94
1 changed files with 15 additions and 0 deletions
15
eat.el
15
eat.el
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue