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.
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 turnedInputContext
intoInputState
, with an associateOutput
type. This ended up requiring updating a lot of places, but I think that the end result should be simpler.