From c78fb4a6794f2dcaa08be524e07a571deb18a6db Mon Sep 17 00:00:00 2001 From: keith Date: Wed, 1 Apr 2020 11:28:12 -0700 Subject: [PATCH] fix error handling on startup --- src/bridge/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bridge/mod.rs b/src/bridge/mod.rs index 351de7f..0efc4fd 100644 --- a/src/bridge/mod.rs +++ b/src/bridge/mod.rs @@ -134,9 +134,6 @@ async fn start_process(mut receiver: UnboundedReceiver) { let mut options = UiAttachOptions::new(); options.set_linegrid_external(true); options.set_rgb(true); - nvim.ui_attach(width as i64, height as i64, &options) - .await - .unwrap_or_explained_panic("Could not attach ui to neovim process"); if let Err(command_error) = nvim.command("runtime! ginit.vim").await { nvim.command(&format!( "echomsg \"error encountered in ginit.vim {:?}\"", @@ -145,6 +142,9 @@ async fn start_process(mut receiver: UnboundedReceiver) { .await .ok(); } + nvim.ui_attach(width as i64, height as i64, &options) + .await + .unwrap_or_explained_panic("Could not attach ui to neovim process"); info!("Neovim process attached"); let nvim = Arc::new(nvim);