Implement device status report function properly
* eat.el (eat--t-device-status-report): Implement properly. Take an argument. * eat.el (eat--t-handle-output): Update call to 'eat--t-device-status-report'.
This commit is contained in:
parent
e26cc22643
commit
1a52dc1dff
1 changed files with 16 additions and 10 deletions
26
eat.el
26
eat.el
|
@ -1970,14 +1970,20 @@ to (1, 1). When N is 3, also erase the scrollback."
|
||||||
;; Restore point.
|
;; Restore point.
|
||||||
(goto-char pos)))))))
|
(goto-char pos)))))))
|
||||||
|
|
||||||
(defun eat--t-device-status-report ()
|
(defun eat--t-device-status-report (n)
|
||||||
"Send the current Y and X coordinate to client."
|
"Report device (terminal) status.
|
||||||
;; TODO: Is this really device status report function?
|
|
||||||
(let ((cursor (eat--t-disp-cursor
|
If N is 5, send OK sequence. If N is 6, send the current Y and X
|
||||||
(eat--t-term-display eat--t-term))))
|
coordinate to client."
|
||||||
(funcall (eat--t-term-input-fn eat--t-term) eat--t-term
|
(pcase n
|
||||||
(format "\e[%i;%iR" (eat--t-cur-y cursor)
|
(5
|
||||||
(eat--t-cur-x cursor)))))
|
(funcall (eat--t-term-input-fn eat--t-term) eat--t-term "\e[0n"))
|
||||||
|
(6
|
||||||
|
(let ((cursor (eat--t-disp-cursor
|
||||||
|
(eat--t-term-display eat--t-term))))
|
||||||
|
(funcall (eat--t-term-input-fn eat--t-term) eat--t-term
|
||||||
|
(format "\e[%i;%iR" (eat--t-cur-y cursor)
|
||||||
|
(eat--t-cur-x cursor)))))))
|
||||||
|
|
||||||
(defun eat--t-set-cursor-state (state)
|
(defun eat--t-set-cursor-state (state)
|
||||||
"Set cursor state to STATE.
|
"Set cursor state to STATE.
|
||||||
|
@ -3218,8 +3224,8 @@ is the selection data encoded in base64."
|
||||||
(setq p (cdr p))))
|
(setq p (cdr p))))
|
||||||
(eat--t-set-sgr-params params))
|
(eat--t-set-sgr-params params))
|
||||||
;; CSI 6 n.
|
;; CSI 6 n.
|
||||||
('((?n) nil ((6)))
|
(`((?n) nil ((,n)))
|
||||||
(eat--t-device-status-report))
|
(eat--t-device-status-report n))
|
||||||
;; CSI <n> SP q.
|
;; CSI <n> SP q.
|
||||||
(`((?q ?\ ) nil ((,n)))
|
(`((?q ?\ ) nil ((,n)))
|
||||||
(eat--t-set-cursor-style n))
|
(eat--t-set-cursor-style n))
|
||||||
|
|
Loading…
Add table
Reference in a new issue