emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/wfnames d034d09e6d 36/98: Restore props after changes made


From: ELPA Syncer
Subject: [nongnu] elpa/wfnames d034d09e6d 36/98: Restore props after changes made by something else than self-insert-command
Date: Tue, 8 Aug 2023 04:01:17 -0400 (EDT)

branch: elpa/wfnames
commit d034d09e6d12a264de891acff601ed1145464ba6
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Restore props after changes made by something else than self-insert-command
---
 wfnames.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/wfnames.el b/wfnames.el
index 5bcabb4fba..a14e2b3928 100644
--- a/wfnames.el
+++ b/wfnames.el
@@ -74,7 +74,7 @@ Special commands:
 "
   (add-hook 'after-change-functions #'wfnames-after-change-hook nil t))
 
-(defun wfnames-after-change-hook (beg _end _len)
+(defun wfnames-after-change-hook (beg end _len)
   (with-current-buffer wfnames-buffer
     (save-excursion
       (save-match-data
@@ -100,7 +100,12 @@ Special commands:
                    (overlay-put ov 'face face)
                    (overlay-put ov 'hff-changed t)
                    (overlay-put ov 'priority 0)
-                   (overlay-put ov 'evaporate t))))))))
+                   (overlay-put ov 'evaporate t)))
+          ;; When text is modified with something else than
+          ;; self-insert-command e.g. yank or iedit-rect, it loose its
+          ;; properties, so restore props here.
+          (put-text-property beg end 'face 'wfnames-files)
+          (put-text-property beg end 'old-name old))))))
 
 (cl-defun wfnames-setup-buffer (files
                                 &optional (display-fn #'switch-to-buffer))



reply via email to

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