# HG changeset patch # User Miles Bader # Date 1023873411 0 # Node ID 159963013ec60c379491a3012c4dc4c9b3440206 # Parent 2030da0c85f2811fff73668081d4a933ab9ff14e (comint-send-input): Properly handle empty and no-newline input regions. diff -r 2030da0c85f2 -r 159963013ec6 lisp/comint.el --- 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