changeset 45770:159963013ec6

(comint-send-input): Properly handle empty and no-newline input regions.
author Miles Bader <miles@gnu.org>
date Wed, 12 Jun 2002 09:16:51 +0000
parents 2030da0c85f2
children 4873e4ecda40
files lisp/comint.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Wed Jun 12 05:11:22 2002 +0000
+++ b/lisp/comint.el	Wed Jun 12 09:16:51 2002 +0000
@@ -1446,7 +1446,7 @@
 
 	  (let ((beg (marker-position pmark))
 		(end (if no-newline (point) (1- (point)))))
-	    (when (not (> beg end))	; handle a special case
+	    (when (> end beg)
 	      ;; Set text-properties for the input field
 	      (add-text-properties
 	       beg end
@@ -1461,7 +1461,7 @@
 		;; `boundary' field to make cursor movement between input
 		;; and output fields smoother.
 		(put-text-property beg end 'field 'input)))
-	    (unless comint-use-prompt-regexp-instead-of-fields
+	    (unless (or no-newline comint-use-prompt-regexp-instead-of-fields)
 	      ;; Cover the terminating newline
 	      (add-text-properties end (1+ end)
 				   '(rear-nonsticky t