protesilaos / spacious-padding

Increase the padding/spacing of GNU Emacs frames and windows.
GNU General Public License v3.0
64 stars 3 forks source link

Allow specifying 0 padding for mode-line, header-line, etc. #7

Closed Sorixelle closed 6 months ago

Sorixelle commented 6 months ago

Currently, attempting to set any key of spacious-padding-widths that uses spacious-padding-set-face-box-padding (eg. :mode-line-width, :header-line-width) in box width calculations to 0 results in an error similar to the following:

Error (use-package): spacious-padding/:config: Invalid face box: :line-width, 0, :color, "#24273a", :style, nil

This is because 0 is an invalid value for :line-width in a face's :box. This PR adds a check to see if the specified padding width is 0 before adding the box, and only adds the box if the width is not 0 (if the specified width is 0, then the box is unnecessary, since no padding needs to be added).

protesilaos commented 6 months ago

Merged. Thank you!