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

Convert EditContext trait into a struct #125

Merged
merged 1 commit into from
Jan 28, 2024
Merged

Convert EditContext trait into a struct #125

merged 1 commit into from
Jan 28, 2024

Conversation

ulyssa
Copy link
Owner

@ulyssa ulyssa commented Jan 28, 2024

I initially made EditContext a trait, so that the different keybindings for Vim, Emacs, etc., could implement it for their own context structs. I'd thought that this would make some things simpler in the Emacs keybindings since it could return constants for some of the methods, but it really just ends up complicating things for everyone who needs to consume EditContext, and makes some command bar features harder to implement.

I've converted EditContext into a struct, and turned InputContext into InputState, with an associate Output type. This ended up requiring updating a lot of places, but I think that the end result should be simpler.

@ulyssa ulyssa merged commit 5823f9a into main Jan 28, 2024
4 checks passed
@ulyssa ulyssa deleted the editcontext-struct branch January 28, 2024 07:14
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.

1 participant