From 37cdfec7c73205668498da9b27387f5f3ccfebee Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 18 Jun 2017 15:29:55 -0400 Subject: [PATCH] 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 53a83e6a67b..8c81b43b1fa 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el @@ -117,6 +117,8 @@ arriving, or after." (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.39.2