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

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

[nongnu] elpa/annotate e45381249f 046/372: fix bug that sometimes hid ne


From: ELPA Syncer
Subject: [nongnu] elpa/annotate e45381249f 046/372: fix bug that sometimes hid newlines
Date: Fri, 4 Feb 2022 16:58:17 -0500 (EST)

branch: elpa/annotate
commit e45381249f8eee9734909c3eb71ced3cfbd9ad3f
Author: Bastian Bechtold <bb@Mr-Bigglesworth.local>
Commit: Bastian Bechtold <bb@Mr-Bigglesworth.local>

    fix bug that sometimes hid newlines
    
    in some circumstances, deleting an annotation would trigger
    annotate--annotation-builder for a line with no annotation.
    annotate--annotation builder would then overwrite the display property
    of the newline with an empty string, thus hiding the newline.
---
 annotate.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/annotate.el b/annotate.el
index a30a6e5b78..0c843c5a3a 100644
--- a/annotate.el
+++ b/annotate.el
@@ -380,7 +380,11 @@ annotation plus the newline."
               ;; white space before for all but the first annotation
               (setq prefix (make-string annotate-annotation-column ? )))))
       ;; build facecpec with the annotation text as display property
-      (list 'face 'default 'display text))))
+      (if (string= text "")
+          ;; annotation has been removed: remove display prop
+          (list 'face 'default 'display nil)
+        ;; annotation has been changed/added: change/add display prop
+        (list 'face 'default 'display text)))))
 
 (defun annotate--remove-annotation-property (begin end)
   "Cleans up annotation properties associated with a region."



reply via email to

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