From ef0d062b1fd202fe89bc4bbd33826c46f660ef70 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Sun, 13 Dec 2020 13:29:34 +0900 Subject: Fix cursor positioning. --- helix-term/src/component.rs | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 helix-term/src/component.rs (limited to 'helix-term/src/component.rs') diff --git a/helix-term/src/component.rs b/helix-term/src/component.rs deleted file mode 100644 index 08d6c620..00000000 --- a/helix-term/src/component.rs +++ /dev/null @@ -1,20 +0,0 @@ -// IDEA: render to a cache buffer, then if not changed, copy the buf into the parent -type Surface = (); -pub trait Component { - /// Process input events, return true if handled. - fn process_event(&mut self, event: crossterm::event::Event, args: ()) -> bool; - /// Should redraw? Useful for saving redraw cycles if we know component didn't change. - fn should_update(&self) -> bool { - true - } - - fn render(&mut self, surface: &mut Surface, args: ()); -} - -// HStack / VStack -// focus by component id: each View/Editor gets it's own incremental id at create -// Component: View(Arc) -> multiple views can point to same state -// id 0 = prompt? -// when entering to prompt, it needs to direct Commands to last focus window -// -> prompt.trigger(focus_id), on_leave -> focus(focus_id) -// popups on another layer -- cgit v1.2.3-70-g09d2