summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2002-06-12 09:18:26 +0000
committerMiles Bader <miles@gnu.org>2002-06-12 09:18:26 +0000
commit1b55e3016d1fea6ac5773b9c48d32cc70969161c (patch)
treefe2f63c6ed5d9fd9316679a85c7d3acc264dcf23
parentcd012309486ce70aa32876635607432f14987a65 (diff)
downloademacs-1b55e3016d1fea6ac5773b9c48d32cc70969161c.tar.gz
emacs-1b55e3016d1fea6ac5773b9c48d32cc70969161c.tar.bz2
emacs-1b55e3016d1fea6ac5773b9c48d32cc70969161c.zip
(comint-send-input): Properly handle empty and no-newline input regions.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/comint.el4
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4fa5907ac0f..d6e24578db8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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'.
diff --git a/lisp/comint.el b/lisp/comint.el
index d6247dd14a6..9d31e975789 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -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