Add comments for eshell preoutput-filter fix

This commit is contained in:
syl20bnr 2017-04-09 22:56:39 -04:00
parent 538a778a39
commit 24db3c6513

View file

@ -83,6 +83,12 @@
(add-hook 'eshell-mode-hook 'spacemacs/disable-hl-line-mode))
:config
(progn
;; Work around bug in eshell's preoutput-filter code.
;; Eshell doesn't call preoutput-filter functions in the context of the eshell
;; buffer. This breaks the xterm color filtering when the eshell buffer is updated
;; when it's not currently focused.
;; To remove if/when fixed upstream.
(define-advice eshell-output-filter (:around (fn process string) with-buffer)
(let ((proc-buf (if process (process-buffer process)
(current-buffer))))