From 45268b6e5a6e32335ea783fe5e138fdd141d4b31 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 5 Jan 2026 19:16:19 +0000 Subject: [PATCH] Fix duplicate foreground property in face when updating tp-text Changed from using tp-add to set-text-properties when text content is same but properties differ. This prevents duplicate property merging since merged-props already contains the complete set of properties. Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com> --- tp.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tp.el b/tp.el index 395540f..ff9a631 100644 --- a/tp.el +++ b/tp.el @@ -1012,8 +1012,8 @@ Text properties embedded in NEW-TEXT are merged with PROPS." (old-text (buffer-substring-no-properties m-start m-end))) (if (equal old-text (substring-no-properties new-text)) ;; Text content is the same, but properties may differ - ;; Use tp-add to update properties (merges embedded props from new-text) - (tp-add m-start m-end merged-props) + ;; Use set-text-properties to replace with merged properties + (set-text-properties m-start m-end merged-props) ;; Text content is different - delete old text and insert new (delete-region m-start m-end) (goto-char m-start)