Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug in spacious-padding-set-window-divider #11

Open
larsen opened this issue Apr 10, 2024 · 1 comment
Open

Possible bug in spacious-padding-set-window-divider #11

larsen opened this issue Apr 10, 2024 · 1 comment

Comments

@larsen
Copy link

larsen commented Apr 10, 2024

Hello Protesilaos,

first of all thank you for this package, I really like the aesthetic changes it allows.

While working on my configuration I found a condition that perhaps should be addressed (in the code or the documentation).

Reading the docstring for spacious-padding-widths I thought that it was not required to specify all the elements in the new plist. For example, at a certain point it says (emphasys added by me):

The more specific keys :left-fringe-width and :right-fringe-wdith can be used for finer control.

I extended this and interpreted the instructions as they were saying that all keys are optional, and somehow defaults are enforced for those not specified.

But, elsewhere in the code:

`((t ,(when (> (plist-get spacious-padding-widths :right-divider-width) 1)

Since I initially didn't specify a value for :right-divider-width, the call to plist-get returns NIL, which > does not like.

I think there should be a guard, a default value, or a note in the docstring specifying what values are mandatory.

@protesilaos
Copy link
Owner

Hello @larsen!

Yes, this is a good point. I think it is better to have reasonable fallback values for everything and to assume that the user opts in to them.

protesilaos added a commit that referenced this issue Apr 29, 2024
…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: <#11>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants