From 34f41c8573936285076b4e24c2e7ff4d34a48b8d Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 18 Jun 2017 15:29:55 -0400 Subject: [PATCH v1] Reset ansi escape context before printing eshell prompt (Bug#27407) * lisp/eshell/em-prompt.el (eshell-emit-prompt): Reset `ansi-color-context-region'. --- lisp/eshell/em-prompt.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index 53a83e6a67..8c81b43b1f 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el @@ -117,6 +117,8 @@ (defun eshell-prompt-initialize () (defun eshell-emit-prompt () "Emit a prompt if eshell is being used interactively." + (when (boundp 'ansi-color-context-region) + (setq ansi-color-context-region nil)) (run-hooks 'eshell-before-prompt-hook) (if (not eshell-prompt-function) (set-marker eshell-last-output-end (point)) -- 2.11.1