From 1d93540371aadec8f877bd781267d38d411c40a0 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 5 Apr 2021 17:30:11 -0400 Subject: [PATCH] * 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 b04d404676d..4f13ff31acb 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 () -- 2.39.5