diff options
author | Jeff Zhao <jeff.no.zhao@gmail.com> | 2023-07-30 13:16:40 -0400 |
---|---|---|
committer | Jeff Zhao <jeff.no.zhao@gmail.com> | 2023-07-30 13:16:40 -0400 |
commit | 5e6e09e14f9e7c58d610646bd48efac8d6f8dd2f (patch) | |
tree | e6b30dfa0cba8bd0bbcaaad0e3ebfc2a104cb51c | |
parent | 519df1e3c250dd05565b01fa4077335f01555c56 (diff) |
fix unwrap error
-rw-r--r-- | src/commands/open_file.rs | 3 | ||||
-rw-r--r-- | src/commands/sub_process.rs | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/commands/open_file.rs b/src/commands/open_file.rs index 42f1ea4..c680cb7 100644 --- a/src/commands/open_file.rs +++ b/src/commands/open_file.rs @@ -56,8 +56,9 @@ where context.worker_context_mut().push_child(child_id, handle); } else { backend.terminal_drop(); - execute_and_wait(option, files)?; + let res = execute_and_wait(option, files); backend.terminal_restore()?; + res?; } Ok(()) } diff --git a/src/commands/sub_process.rs b/src/commands/sub_process.rs index fc31278..b0ba1ee 100644 --- a/src/commands/sub_process.rs +++ b/src/commands/sub_process.rs @@ -55,13 +55,13 @@ pub fn sub_process( ) -> JoshutoResult { backend.terminal_drop(); let res = execute_sub_process(context, words, spawn); - reload::soft_reload_curr_tab(context)?; + backend.terminal_restore()?; + let res2 = reload::soft_reload_curr_tab(context); context.message_queue_mut().push_info(format!( "{}: {}", if spawn { "Spawned" } else { "Finished" }, words.join(" ") )); - backend.terminal_restore()?; res?; Ok(()) } |