From 79ac9016d62a4e4ede9460380e9664785aa1bcc4 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Mon, 5 Dec 2022 12:37:54 -0500 Subject: [PATCH] [margin-path] Move label to the margin --- ace-window.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ace-window.el b/ace-window.el index ccb2783..7054acd 100644 --- a/ace-window.el +++ b/ace-window.el @@ -400,10 +400,13 @@ LEAF is (PT . WND)." (when (/= pt old-pt) (goto-char (+ pt 1)) (push (cons wnd old-pt) aw--windows-points))) - (overlay-put ol 'display (aw--overlay-str wnd pt path)) - (if (window-minibuffer-p wnd) - (overlay-put ol 'face 'aw-minibuffer-leading-char-face) - (overlay-put ol 'face 'aw-leading-char-face)) + ;; this is where we would need to add a display-margin thingie + (overlay-put ol 'before-string + (propertize "." 'display + `((margin left-margin) + ,(propertize + (concat " " (aw--overlay-str wnd pt path)) + 'face (if (window-minibuffer-p wnd) 'aw-minibuffer-leading-char-face 'aw-leading-char-face))))) (overlay-put ol 'window wnd) (push ol avy--overlays-lead)))))