diff options
author | Blaž Hrastnik | 2020-09-04 09:18:40 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-09-04 09:18:40 +0000 |
commit | 0d56ce9296ef6481b45cfdc90ea8b1d149ead242 (patch) | |
tree | fd08a114df4baee24c1994799541e8a2bfb2c449 /helix-term/src/editor.rs | |
parent | bfa753307063034abd86de5d9f99f5fe925504ca (diff) |
Bump deps, make it compile with latest smol.
Diffstat (limited to 'helix-term/src/editor.rs')
-rw-r--r-- | helix-term/src/editor.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/helix-term/src/editor.rs b/helix-term/src/editor.rs index a83db6fa..bddc2859 100644 --- a/helix-term/src/editor.rs +++ b/helix-term/src/editor.rs @@ -39,6 +39,8 @@ impl BufferComponent<'_> { } } +static EX: smol::Executor = smol::Executor::new(); + pub struct Editor { state: Option<State>, first_line: u16, @@ -134,14 +136,14 @@ impl Editor { } } - pub fn run(&mut self) -> Result<(), Error> { + pub async fn run(&mut self) -> Result<(), Error> { enable_raw_mode()?; let mut stdout = stdout(); execute!(stdout, terminal::EnterAlternateScreen)?; - smol::run(self.print_events()); + self.print_events().await; execute!(stdout, terminal::LeaveAlternateScreen)?; |