Skip to content

Fix keybindings config merging#46

Merged
nicholasjpaterno merged 1 commit intoEpistates:mainfrom
enzalito:fix-keybindings
Mar 4, 2026
Merged

Fix keybindings config merging#46
nicholasjpaterno merged 1 commit intoEpistates:mainfrom
enzalito:fix-keybindings

Conversation

@enzalito
Copy link
Contributor

@enzalito enzalito commented Mar 4, 2026

Currently user keybindings are not properly merged, the defaults take precedence on the user defined ones.

This PR fixes that and also adds a Noop action to allow keys to be unbound.

The keybindings crate stores binds in a Vec and does not filter out duplicate key sequences so i added de-duplication logic to Keybindings::from_config. That way functions that iterate on the bindings (like Keybindings::help_entries) will work as expected.

I'm pretty new to Rust so sorry in advance if my code stinks.

@nicholasjpaterno
Copy link
Contributor

@enzalito thanks for the PRs! Your rust is just fine. I'm taking a look now at both of your PRs - contributions are greatly appreciated! I hope you're otherwise enjoying treemd so far!

@nicholasjpaterno
Copy link
Contributor

@enzalito there are a few minor tweaks that I will make but for the most part these look great! Thank you for taking the time to open these.

@enzalito
Copy link
Contributor Author

enzalito commented Mar 4, 2026

Thanks! It's a really nice tool. Looking forward to making some more contributions in the future!

@nicholasjpaterno
Copy link
Contributor

Thank you @enzalito that would be greatly appreciated!

@nicholasjpaterno nicholasjpaterno merged commit db27282 into Epistates:main Mar 4, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants