From 95499f18dd7cb0811dd304acd051e493fa8661d6 Mon Sep 17 00:00:00 2001 From: mo8it Date: Mon, 6 Apr 2026 23:11:13 +0200 Subject: [PATCH] Close editor on quit --- src/main.rs | 1 + src/watch.rs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7cd5c80b..652d1468 100644 --- a/src/main.rs +++ b/src/main.rs @@ -111,6 +111,7 @@ fn main() -> Result { }; watch::watch(&mut app_state, notify_exercise_names)?; + app_state.close_editor()?; } Some(Command::Run { name }) => { if let Some(name) = name { diff --git a/src/watch.rs b/src/watch.rs index ab96893e..857ccfde 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -172,8 +172,7 @@ pub fn watch( watch_list_loop(app_state, notify_exercise_names) } -const QUIT_MSG: &[u8] = b" - +const QUIT_MSG: &[u8] = b"q\n We hope you're enjoying learning Rust! If you want to continue working on the exercises at a later point, you can simply run `rustlings` again in this directory. ";