branch: elpa/popup commit 51b3f591fe68f77d1b883bb460ef446fdb0405ca Author: Syohei YOSHIDA <syo...@gmail.com> Commit: Syohei YOSHIDA <syo...@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