From: Lars Ingebrigtsen Date: Fri, 30 Jul 2021 12:03:43 +0000 (+0200) Subject: Allow shell PROMPT strings to have ANSI codes X-Git-Tag: emacs-28.0.90~1649 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2ece0f8d3c741bf27c6e035c5fcd2d60f164ab51;p=emacs.git Allow shell PROMPT strings to have ANSI codes * lisp/comint.el (comint-output-filter): Don't overwrite ANSI codes from the prompt command (bug#11883). --- diff --git a/lisp/comint.el b/lisp/comint.el index 78012616215..40f58f2da7b 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2157,9 +2157,9 @@ Make backspaces delete the previous character." 'comint-highlight-prompt)) (setq comint-last-prompt (cons (copy-marker prompt-start) (point-marker))) - (font-lock-prepend-text-property prompt-start (point) - 'font-lock-face - 'comint-highlight-prompt) + (font-lock-append-text-property prompt-start (point) + 'font-lock-face + 'comint-highlight-prompt) (add-text-properties prompt-start (point) `(rear-nonsticky ,comint--prompt-rear-nonsticky)))