Don't accept 'nil' as annotation correction delay

* eat.el (eat-shell-prompt-annotation-correction-delay): Don't
accept 'nil'.
* eat.el (eat--process-output-queue): Don't accept value 'nil'
for 'eat-shell-prompt-annotation-correction-delay'.
This commit is contained in:
Akib Azmain Turja 2022-12-07 11:17:20 +06:00
parent a65b7bc064
commit 2ea84e0a34
No known key found for this signature in database
GPG key ID: 5535FCF54D88616B

19
eat.el
View file

@ -214,11 +214,8 @@ The value can be one of the following:
"Seconds to wait before correcting shell prompt annotations. "Seconds to wait before correcting shell prompt annotations.
Wait this many second after terminal update before correcting shell Wait this many second after terminal update before correcting shell
prompt annotation. prompt annotation."
:type 'number
Nil means correct immediately after terminal update."
:type '(choice (const :tag "Immediately" nil)
number)
:group 'eat-ui) :group 'eat-ui)
(defconst eat--cursor-type-value-type (defconst eat--cursor-type-value-type
@ -4953,13 +4950,11 @@ OS's."
(max (point-min) (max (point-min)
(- (eat-term-display-beginning eat--terminal) (- (eat-term-display-beginning eat--terminal)
eat-term-scrollback-size)))) eat-term-scrollback-size))))
(if (null eat-shell-prompt-annotation-correction-delay) (setq eat--shell-prompt-annotation-correction-timer
(eat--correct-shell-prompt-mark-overlays buffer) (run-with-timer
(setq eat--shell-prompt-annotation-correction-timer eat-shell-prompt-annotation-correction-delay
(run-with-timer nil #'eat--correct-shell-prompt-mark-overlays
eat-shell-prompt-annotation-correction-delay buffer))
nil #'eat--correct-shell-prompt-mark-overlays
buffer)))
(when synchronize-scroll (when synchronize-scroll
(funcall eat--synchronize-scroll-function)))))) (funcall eat--synchronize-scroll-function))))))