]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/comint.el: Fix understickiness of non-comint properties
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 5 Apr 2021 21:30:11 +0000 (17:30 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 5 Apr 2021 21:30:11 +0000 (17:30 -0400)
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

index b04d404676da138319c2d31c096d00bfd3ef5ae5..4f13ff31acbe1d4ca73e8c5966ff2bea43a10aca 100644 (file)
@@ -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 ()