From c64cc467751e1de930d75759087a5f6955ddecf4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 12 May 1993 20:32:32 +0000 Subject: [PATCH] (comint-filter): Increment opoint only if after insertion point. --- lisp/comint.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/comint.el b/lisp/comint.el index 5c0d27ccb89..0d49cba5590 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -662,7 +662,8 @@ Similarly for Soar, Scheme, etc." (nchars (length string))) (widen) (goto-char (process-mark process)) - (setq opoint (+ opoint nchars)) + (if (<= (point) opoint) + (setq opoint (+ opoint nchars))) ;; Insert after old_begv, but before old_zv. (if (< (point) obeg) (setq obeg (+ obeg nchars)))