-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: type error in case config.bindings = false
.
#57
Conversation
Hm, maybe this got broken as a result of #47. The expectation was that setting So disabling them both would be required, but I wrote the documentation before the dailies extension was created. |
I'm willing to extend this fix so that it behaves correctly, but from your message, I'm not sure which behavior you'd prefer to see. Should |
I think that's totally fair to support. I'm up for anything that seems intuitive and reasonable. 😄 Did you want to make that addition in this PR? If so, we can do that and update the documentation. |
4b24977
to
81e059f
Compare
Alright, I've thought about it some more and ended up just silently disabling dailies bindings if core bindings are disabled. Otherwise, someone who wanted no default bindings whatsoever would've had to override both, which seemed overly annoying. I've also added tests for this behavior and adjusted the docs. Feel free to let me know if you'd like anything changed, and also feel free to make any changes yourself! 🙂 |
Looks good to me! Thanks for the contribution. |
The docs say this:
but the keybindings code accessed
config.bindings.prefix
unconditionally, causing a type error ifconfig.bindings
is the boolean valuefalse
. This PR fixes this by fetchingprefix
from the localbindings
variable, which defaults to{}
if a false value was configured.We perform the same fix for the dailies extension. It's a bit unclear what happens in this case:
My understanding of the code is that
<prefix>
will remain unexpanded in this case.