From a67b1f1944262f41e58c87f09d28858725aa5ca9 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 30 Dec 2021 19:43:58 +0800 Subject: [PATCH] Make sure widget buttons always have a left box line * lisp/wid-edit.el (widget-specify-button): Add an invisible before-string to the button overlay. (bug#51550) --- lisp/wid-edit.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index a53add7d084..22f3d299081 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -437,8 +437,9 @@ the :notify function can't know the new value.") (follow-link (widget-get widget :follow-link)) (help-echo (widget-get widget :help-echo))) (widget-put widget :button-overlay overlay) - (if (functionp help-echo) + (when (functionp help-echo) (setq help-echo 'widget-mouse-help)) + (overlay-put overlay 'before-string #(" " 0 1 (invisible t))) (overlay-put overlay 'button widget) (overlay-put overlay 'keymap (widget-get widget :keymap)) (overlay-put overlay 'evaporate t) -- 2.39.2