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

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

[nongnu] elpa/popup 51b3f59 133/184: Fix for Emacs 24.5 issue


From: ELPA Syncer
Subject: [nongnu] elpa/popup 51b3f59 133/184: Fix for Emacs 24.5 issue
Date: Wed, 6 Oct 2021 00:01:28 -0400 (EDT)

branch: elpa/popup
commit 51b3f591fe68f77d1b883bb460ef446fdb0405ca
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>

    Fix for Emacs 24.5 issue
    
    On Emacs 24.5 or higher, string in 'after-string' of overlay which sets 
'display'
    property at same time does not display in some cases.
    
    (However I don't understand well this issue.)
---
 popup.el | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/popup.el b/popup.el
index d197f8c..392833b 100644
--- a/popup.el
+++ b/popup.el
@@ -378,16 +378,15 @@ usual."
       (put-text-property start (length content) 'face face content))
     (when mouse-face
       (put-text-property 0 (length content) 'mouse-face mouse-face content))
-    (unless (overlay-get overlay 'dangle)
-      (overlay-put overlay 'display (concat prefix (substring content 0 1)))
-      (setq prefix nil
-            content (concat (substring content 1))))
-    (overlay-put overlay
-                 'after-string
-                 (concat prefix
-                         content
-                         scroll-bar-char
-                         postfix))))
+    (let ((prop (if (overlay-get overlay 'dangle)
+                    'after-string
+                  'display)))
+      (overlay-put overlay
+                   prop
+                   (concat prefix
+                           content
+                           scroll-bar-char
+                           postfix)))))
 
 (cl-defun popup-create-line-string (popup
                                     string



reply via email to

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