From f125f054ff2ff9a9284e2fc875b5c78f3b78bf08 Mon Sep 17 00:00:00 2001 From: Sergio Ribera Date: Sat, 16 Apr 2022 02:13:58 -0400 Subject: [PATCH] fix: bad format of code --- src/bridge/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/bridge/mod.rs b/src/bridge/mod.rs index f9ab352..411fae3 100644 --- a/src/bridge/mod.rs +++ b/src/bridge/mod.rs @@ -85,15 +85,14 @@ async fn start_neovim_runtime() { let nvim = Arc::new(nvim); start_ui_command_handler(nvim.clone()); - + // Verify if the files to open is more than one if settings.files.len() > 1 { - // Open the first file into a first window - let first_file = settings.files.first().unwrap(); - nvim.command(format!("e {}", first_file).as_str()).await.unwrap_or_explained_panic("Could not create new tab"); // Open the rest of the files into new tabs for file in settings.files.iter().skip(1) { - nvim.command(format!("tabnew {}", file).as_str()).await.unwrap_or_explained_panic("Could not create new tab"); + nvim.command(format!("tabnew {}", file).as_str()) + .await + .unwrap_or_explained_panic("Could not create new tab"); } } SETTINGS.read_initial_values(&nvim).await;