From 2ece0f8d3c741bf27c6e035c5fcd2d60f164ab51 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 30 Jul 2021 14:03:43 +0200 Subject: [PATCH] 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). --- lisp/comint.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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))) -- 2.39.2