GNU bug report logs -
#56820
outline-minor-mode replacing the first character with an arrow
Previous Next
Full log
View this message in rfc822 format
> Thanks that fixed the default behaviour but
> outline-minor-mode-use-buttons option still has a weird bug because
> when you use it with modes like python-mode and ruby-mode it replaces
> the first character of the outline-regep which for the aforementioned
> modes is strings like "module", "class", "def" etc... so when it
> replaces the first character it renders the buffer unreadable. So it
> might be better to insert the arrows in front of the first character
> instead of replacing the first character.
This patch could help to alleviate the problem by keeping
the first character displayed on the outline button:
```
diff --git a/lisp/outline.el b/lisp/outline.el
index 857ac9562f..498ea6fad4 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1006,7 +1018,8 @@ outline--make-button-overlay
(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 (plist-get icon 'string))
+ (overlay-put o 'display (concat (plist-get icon 'string)
+ (string (char-after (point)))))
(overlay-put o 'face (plist-get icon 'face)))
o))
```
This bug report was last modified 2 years and 258 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.