[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 471414fe6b: Fix outline image icon display (bug#57813)
From: |
Juri Linkov |
Subject: |
master 471414fe6b: Fix outline image icon display (bug#57813) |
Date: |
Thu, 15 Sep 2022 12:30:53 -0400 (EDT) |
branch: master
commit 471414fe6ba8e9c9d755a83e7feddcdd5a45456a
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
Fix outline image icon display (bug#57813)
* lisp/outline.el (outline--make-button-overlay): Don't overwrite
image display with string display when image exists.
(outline--fix-up-all-buttons): Optimize.
---
lisp/outline.el | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lisp/outline.el b/lisp/outline.el
index b19e0cf811..c9d1a4ac64 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1003,11 +1003,11 @@ If non-nil, EVENT should be a mouse event."
;; movement commands work more logically.
(when (derived-mode-p 'special-mode)
(put-text-property (point) (1+ (point)) 'face (plist-get icon 'face)))
- (when-let ((image (plist-get icon 'image)))
- (overlay-put o 'display image))
- (overlay-put o 'display (concat (plist-get icon 'string)
- (string (char-after (point)))))
- (overlay-put o 'face (plist-get icon 'face)))
+ (if-let ((image (plist-get icon 'image)))
+ (overlay-put o 'display image)
+ (overlay-put o 'display (concat (plist-get icon 'string)
+ (string (char-after (point)))))
+ (overlay-put o 'face (plist-get icon 'face))))
o))
(defun outline--insert-open-button ()
@@ -1041,11 +1041,11 @@ If non-nil, EVENT should be a mouse event."
"<mouse-2>" #'outline-show-subtree))))))
(defun outline--fix-up-all-buttons (&optional from to)
- (when from
- (save-excursion
- (goto-char from)
- (setq from (line-beginning-position))))
(when (outline--use-buttons-p)
+ (when from
+ (save-excursion
+ (goto-char from)
+ (setq from (line-beginning-position))))
(outline-map-region
(lambda ()
;; `outline--cycle-state' will fail if we're in a totally
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 471414fe6b: Fix outline image icon display (bug#57813),
Juri Linkov <=