]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow shell PROMPT strings to have ANSI codes
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 30 Jul 2021 12:03:43 +0000 (14:03 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 30 Jul 2021 12:03:43 +0000 (14:03 +0200)
* lisp/comint.el (comint-output-filter): Don't overwrite ANSI
codes from the prompt command (bug#11883).

lisp/comint.el

index 78012616215ef005b298c25a266f50b413bebfa1..40f58f2da7bbbc06977641661cdb2cd25e15ccff 100644 (file)
@@ -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)))