[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 949bc1c72d7: comint-fontify-input: Fix field boundary issue (bug#
From: |
Eli Zaretskii |
Subject: |
master 949bc1c72d7: comint-fontify-input: Fix field boundary issue (bug#59626) |
Date: |
Wed, 7 Dec 2022 10:43:24 -0500 (EST) |
branch: master
commit 949bc1c72d77aed1cea8d52422825cd8baf6d9ba
Author: Miha Rihtaršič <miha@kamnitnik.top>
Commit: Eli Zaretskii <eliz@gnu.org>
comint-fontify-input: Fix field boundary issue (bug#59626)
* lisp/comint.el (comint--intersect-regions): Don't call
'field-end' if we are on a field boundary already.
Copyright-paperwork-exempt: yes
---
lisp/comint.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lisp/comint.el b/lisp/comint.el
index 4d9fc501874..6742360d16b 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -4121,9 +4121,15 @@ function called, or nil, if no function was called (if
BEG = END)."
(save-restriction
(let ((beg2 beg1)
(end2 end1))
- (when (= beg2 beg)
+ (when (and (= beg2 beg)
+ (> beg2 (point-min))
+ (eq is-output
+ (eq (get-text-property (1- beg2) 'field) 'output)))
(setq beg2 (field-beginning beg2)))
- (when (= end2 end)
+ (when (and (= end2 end)
+ (< end2 (point-max))
+ (eq is-output
+ (eq (get-text-property (1+ end2) 'field) 'output)))
(setq end2 (field-end end2)))
;; Narrow to the whole field surrounding the region
(narrow-to-region beg2 end2))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 949bc1c72d7: comint-fontify-input: Fix field boundary issue (bug#59626),
Eli Zaretskii <=