emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1d93540: * lisp/comint.el: Fix understickiness of non-comint prop


From: Stefan Monnier
Subject: master 1d93540: * lisp/comint.el: Fix understickiness of non-comint properties
Date: Mon, 5 Apr 2021 17:30:15 -0400 (EDT)

branch: master
commit 1d93540371aadec8f877bd781267d38d411c40a0
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/comint.el: Fix understickiness of non-comint properties
    
    When a third party package adds properties to the prompt they don't
    necessarily want to be `read-nonsticky` (e.g. for the `cursor-intangible`
    property), so replace the catchall `rear-nonsticky t` with an
    actual list of the properties that we want to be `rear-nonsticky`.
    
    (comint-send-input, comint-output-filter): Don't mark
    all properties as non-sticky.
---
 lisp/comint.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/comint.el b/lisp/comint.el
index b04d404..4f13ff3 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1917,7 +1917,8 @@ Similarly for Soar, Scheme, etc."
             (unless (or no-newline comint-use-prompt-regexp)
               ;; Cover the terminating newline
               (add-text-properties end (1+ end)
-                                   '(rear-nonsticky t
+                                   '(rear-nonsticky
+                                     (field inhibit-line-move-field-capture 
read-only)
                                      field boundary
                                      inhibit-line-move-field-capture t)))))
 
@@ -2126,7 +2127,8 @@ Make backspaces delete the previous character."
                 (add-text-properties comint-last-output-start (point)
                                      '(front-sticky
                                       (field inhibit-line-move-field-capture)
-                                      rear-nonsticky t
+                                      rear-nonsticky
+                                      (field inhibit-line-move-field-capture 
read-only)
                                       field output
                                       inhibit-line-move-field-capture t))))
 
@@ -2155,7 +2157,9 @@ Make backspaces delete the previous character."
              (font-lock-prepend-text-property prompt-start (point)
                                               'font-lock-face
                                               'comint-highlight-prompt)
-             (add-text-properties prompt-start (point) '(rear-nonsticky t)))
+             (add-text-properties prompt-start (point)
+                                  '(rear-nonsticky
+                                    (field inhibit-line-move-field-capture 
read-only))))
            (goto-char saved-point)))))))
 
 (defun comint-preinput-scroll-to-bottom ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]