summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorVitalie Spinu <spinuvit@gmail.com>2013-12-20 14:25:19 +0800
committerChong Yidong <cyd@gnu.org>2013-12-20 14:25:19 +0800
commitca65efcc2ea7f6876fee2f7d2d929dffa4093f96 (patch)
tree1f7594f56d89c2fb69354ecdeaf069d2953b9ce8 /lisp/comint.el
parenta9574eb7306c56e68ad4c20d58f419b317902f1a (diff)
downloademacs-ca65efcc2ea7f6876fee2f7d2d929dffa4093f96.tar.gz
comint.el (comint-output-filter): Fix rear-nonsticky property placement.
Fixes: debbugs:16010
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 5cdec45650d..d7e92804f52 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -2062,23 +2062,22 @@ Make backspaces delete the previous character."
(let ((prompt-start (save-excursion (forward-line 0) (point)))
(inhibit-read-only t))
(when comint-prompt-read-only
- (with-silent-modifications
- (or (= (point-min) prompt-start)
- (get-text-property (1- prompt-start) 'read-only)
- (put-text-property
- (1- prompt-start) prompt-start 'read-only 'fence))
- (add-text-properties
- prompt-start (point)
- '(read-only t rear-nonsticky t front-sticky (read-only)))))
+ (with-silent-modifications
+ (or (= (point-min) prompt-start)
+ (get-text-property (1- prompt-start) 'read-only)
+ (put-text-property (1- prompt-start)
+ prompt-start 'read-only 'fence))
+ (add-text-properties prompt-start (point)
+ '(read-only t front-sticky (read-only)))))
(when comint-last-prompt
(remove-text-properties (car comint-last-prompt)
(cdr comint-last-prompt)
'(font-lock-face)))
(setq comint-last-prompt
(cons (copy-marker prompt-start) (point-marker)))
- (add-text-properties (car comint-last-prompt)
- (cdr comint-last-prompt)
- '(font-lock-face comint-highlight-prompt)))
+ (add-text-properties prompt-start (point)
+ '(rear-nonsticky t
+ font-lock-face comint-highlight-prompt)))
(goto-char saved-point)))))))
(defun comint-preinput-scroll-to-bottom ()