liner icon indicating copy to clipboard operation
liner copied to clipboard

Change how events are passed to the user of liner?

Open MovingtoMars opened this issue 8 years ago • 1 comments

Right now, we pass closures to the Context/Editor to process Events.

Would something like this be better?

pub trait EventHandler {
    fn handle_before_key_press(&mut self, key: Key) {}
    fn handle_after_key_press(&mut self, key: Key) {}
    ...
}

MovingtoMars avatar Jun 01 '17 09:06 MovingtoMars

Tough call. I think the current way is more rustic vs having a trait.

iamcodemaker avatar Jun 15 '17 02:06 iamcodemaker