aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitalie Spinu2013-12-20 14:25:19 +0800
committerChong Yidong2013-12-20 14:25:19 +0800
commitca65efcc2ea7f6876fee2f7d2d929dffa4093f96 (patch)
tree1f7594f56d89c2fb69354ecdeaf069d2953b9ce8
parenta9574eb7306c56e68ad4c20d58f419b317902f1a (diff)
downloademacs-ca65efcc2ea7f6876fee2f7d2d929dffa4093f96.tar.gz
emacs-ca65efcc2ea7f6876fee2f7d2d929dffa4093f96.zip
comint.el (comint-output-filter): Fix rear-nonsticky property placement.
Fixes: debbugs:16010
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/comint.el21
2 files changed, 15 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 416f9a8b685..2e0db47df47 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-12-20 Vitalie Spinu <spinuvit@gmail.com>
2
3 * comint.el (comint-output-filter): Fix rear-nonsticky property
4 placement (Bug#16010).
5
12013-12-20 Chong Yidong <cyd@gnu.org> 62013-12-20 Chong Yidong <cyd@gnu.org>
2 7
3 * faces.el (read-color): Minor fix for completion function. 8 * faces.el (read-color): Minor fix for completion function.
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."
2062 (let ((prompt-start (save-excursion (forward-line 0) (point))) 2062 (let ((prompt-start (save-excursion (forward-line 0) (point)))
2063 (inhibit-read-only t)) 2063 (inhibit-read-only t))
2064 (when comint-prompt-read-only 2064 (when comint-prompt-read-only
2065 (with-silent-modifications 2065 (with-silent-modifications
2066 (or (= (point-min) prompt-start) 2066 (or (= (point-min) prompt-start)
2067 (get-text-property (1- prompt-start) 'read-only) 2067 (get-text-property (1- prompt-start) 'read-only)
2068 (put-text-property 2068 (put-text-property (1- prompt-start)
2069 (1- prompt-start) prompt-start 'read-only 'fence)) 2069 prompt-start 'read-only 'fence))
2070 (add-text-properties 2070 (add-text-properties prompt-start (point)
2071 prompt-start (point) 2071 '(read-only t front-sticky (read-only)))))
2072 '(read-only t rear-nonsticky t front-sticky (read-only)))))
2073 (when comint-last-prompt 2072 (when comint-last-prompt
2074 (remove-text-properties (car comint-last-prompt) 2073 (remove-text-properties (car comint-last-prompt)
2075 (cdr comint-last-prompt) 2074 (cdr comint-last-prompt)
2076 '(font-lock-face))) 2075 '(font-lock-face)))
2077 (setq comint-last-prompt 2076 (setq comint-last-prompt
2078 (cons (copy-marker prompt-start) (point-marker))) 2077 (cons (copy-marker prompt-start) (point-marker)))
2079 (add-text-properties (car comint-last-prompt) 2078 (add-text-properties prompt-start (point)
2080 (cdr comint-last-prompt) 2079 '(rear-nonsticky t
2081 '(font-lock-face comint-highlight-prompt))) 2080 font-lock-face comint-highlight-prompt)))
2082 (goto-char saved-point))))))) 2081 (goto-char saved-point)))))))
2083 2082
2084(defun comint-preinput-scroll-to-bottom () 2083(defun comint-preinput-scroll-to-bottom ()