]> git.eshelyaron.com Git - emacs.git/commitdiff
(comint-send-input): Properly handle empty and no-newline input regions.
authorMiles Bader <miles@gnu.org>
Wed, 12 Jun 2002 09:18:26 +0000 (09:18 +0000)
committerMiles Bader <miles@gnu.org>
Wed, 12 Jun 2002 09:18:26 +0000 (09:18 +0000)
lisp/ChangeLog
lisp/comint.el

index 4fa5907ac0f0773fa7251321d5253b2251ca92d3..d6e24578db8304afe5dc6bf8d4c91e8a8ceacede 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-12  Miles Bader  <miles@gnu.org>
+
+       * comint.el (comint-send-input): Properly handle empty and
+       no-newline input regions.
+
 2002-06-12  Colin Walters  <walters@gnu.org>
 
        * calc/calc.el: Use `when', `unless'.
index d6247dd14a60eb6c5dd7513eef37b00cf87b1093..9d31e97578903a1c94d37b2afaeafdf22be2e4d5 100644 (file)
@@ -1446,7 +1446,7 @@ Similarly for Soar, Scheme, etc."
 
          (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 @@ Similarly for Soar, Scheme, etc."
                ;; `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