From ff6318be1ff2ce70ce28b78d315d5a2cb7648bef Mon Sep 17 00:00:00 2001 From: Simon Marshall Date: Mon, 26 May 1997 09:53:59 +0000 Subject: [PATCH] Use insert to preserve marker positions (pmark) and delete last. --- lisp/comint.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index 8ae8787d2e3..6e6691dea87 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1218,9 +1218,10 @@ Similarly for Soar, Scheme, etc." ;; functions used do insertion, rather than return ;; strings. We have to expand, then insert back. (comint-replace-by-expanded-history t) - (let ((copy (buffer-substring pmark (point)))) - (delete-region pmark (point)) - (insert-before-markers input) + (let ((copy (buffer-substring pmark (point))) + (start (point))) + (insert input) + (delete-region pmark start) copy)))) (if comint-process-echoes (delete-region pmark (point)) -- 2.39.2