summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/comint.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index e5012be982b..a5fca7ea2a1 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -2081,7 +2081,7 @@ Make backspaces delete the previous character."
(prompt-re (concat "\\`" (regexp-quote prompt))))
(while (string-match prompt-re string)
(setq string (substring string (match-end 0)))))))
- (while (string-match (concat "\\(" comint-prompt-regexp
+ (while (string-match (concat "\\(^" comint-prompt-regexp
"\\)\\1+")
string)
(setq string (replace-match "\\1" nil nil string)))