changeset 17956:7af8470b665a

Use insert to preserve marker positions (pmark) and delete last.
author Simon Marshall <simon@gnu.org>
date Mon, 26 May 1997 09:53:59 +0000
parents 3140e48262f9
children 06f81684d7ea
files lisp/comint.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Mon May 26 08:17:39 1997 +0000
+++ b/lisp/comint.el	Mon May 26 09:53:59 1997 +0000
@@ -1218,9 +1218,10 @@
 			  ;; 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))