branch: externals/spacious-padding commit d9b2aad1840a7a9a454e97bc53e853320c551890 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Set a fallback value for the right-divider-width in one place it was missing We already do this in most places, but this one was not covered. Thanks to Stefano Rodighiero for bringing this matter to my attention in issue 11: <https://github.com/protesilaos/spacious-padding/issues/11>. --- spacious-padding.el | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/spacious-padding.el b/spacious-padding.el index acbc172693..ce56e8eef7 100644 --- a/spacious-padding.el +++ b/spacious-padding.el @@ -197,6 +197,15 @@ Examples of valid configurations: '(tab-line tab-line-tab tab-line-tab-inactive) "Tab faces relevant to `spacious-padding-mode'.") +(defun spacious-padding--get-right-divider-width (&optional no-fallback) + "Get the width of window divider. +With optional NO-FALLBACK return nil if there is no value. Else return +a reasonable fallback value." + (cond + ((plist-get spacious-padding-widths :right-divider-width)) + (no-fallback nil) + (t 30))) + (defun spacious-padding--get-box-width (key &optional no-fallback) "Get width for :box of face represented by KEY in `spacious-padding-widths'. Return 4 if KEY does not have a value. If optional NO-FALLBACK @@ -258,8 +267,9 @@ overline." "Set window divider FACE to COLOR its width is greater than 1." (list face - `((t ,(when (> (plist-get spacious-padding-widths :right-divider-width) 1) - (list :background color :foreground color)))))) + `((t + ,(when (> (spacious-padding--get-right-divider-width) 1) + (list :background color :foreground color)))))) (defun spacious-padding-set-invisible-dividers (&rest _) "Make window dividers invisible and add padding.