ulyssa / modalkit

A Rust library for building modal editing applications
Apache License 2.0
58 stars 8 forks source link

Keybindings should provide Action to command bar #144

Closed ulyssa closed 3 months ago

ulyssa commented 3 months ago

In addition to jumping through a buffer to matching regular expressions, Kakoune can perform other actions that all use the same search regex history and interact with the same register (see #62 and #63 for example).

In order to support these, focusing the command bar should specify the action to take when submitting its contents. I've replaced Register::LastSearch ("/) and Register::LastCommand (":) with a Register::LastCommand(CommandType) variant. History for their contents has also moved into the RegisterStore, and is done in a way that should make #69, #130, and any other new command bar types very straightforward to implement.