aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/editor.rs')
-rw-r--r--helix-term/src/editor.rs6
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)?;