* bug#16010: [patch] 24.3.50; Typing in comint buffers inherits prompt text properties
@ 2013-11-30 8:31 Vitalie Spinu
2013-12-20 6:25 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: Vitalie Spinu @ 2013-11-30 8:31 UTC (permalink / raw)
To: 16010
[-- Attachment #1: Type: text/plain, Size: 449 bytes --]
Hi,
If comint-use-prompt-regexp is t typing in comint buffers inherits text
properties from the prompt. See this screencast: http://screencast.com/t/xYa9KVWu7
You can also reproduce it by setting comint-use-prompt-regexp to t in
shell buffers.
Attached is the fix with minor reformatting of the adjacent code for the
readability reasons.
This was probably recently introduced when eliminating the overlays from
comint buffers.
Vitalie
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-add-rear-nonsticky-t-to-comint-prompt.patch --]
[-- Type: text/x-diff, Size: 1912 bytes --]
From 36dd963f3e7eb3a6775879aa98a24ca2221079bb Mon Sep 17 00:00:00 2001
From: Vitalie Spinu <spinuvit@gmail.com>
Date: Fri, 29 Nov 2013 23:25:55 -0800
Subject: [PATCH] add rear-nonsticky t to comint prompt
make sure typing in comint buffers doesn't inherit
comint-highlight-prompt face and other prompt properties.
---
lisp/comint.el | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/lisp/comint.el b/lisp/comint.el
index 3aff313..ee83918 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -2063,20 +2063,18 @@ Make backspaces delete the previous character."
(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)))))
+ (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 ()
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#16010: [patch] 24.3.50; Typing in comint buffers inherits prompt text properties
2013-11-30 8:31 bug#16010: [patch] 24.3.50; Typing in comint buffers inherits prompt text properties Vitalie Spinu
@ 2013-12-20 6:25 ` Chong Yidong
0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2013-12-20 6:25 UTC (permalink / raw)
To: Vitalie Spinu; +Cc: 16010-done
Vitalie Spinu <spinuvit@gmail.com> writes:
> If comint-use-prompt-regexp is t typing in comint buffers inherits text
> properties from the prompt. See this screencast:
> http://screencast.com/t/xYa9KVWu7
>
> You can also reproduce it by setting comint-use-prompt-regexp to t in
> shell buffers.
>
> Attached is the fix with minor reformatting of the adjacent code for the
> readability reasons.
Thanks, look correct; committed to trunk.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-20 6:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-30 8:31 bug#16010: [patch] 24.3.50; Typing in comint buffers inherits prompt text properties Vitalie Spinu
2013-12-20 6:25 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.