From ab0394ae40a466c5e4c7c53fd4ece85fc52f0c24 Mon Sep 17 00:00:00 2001 From: Keith Simmons Date: Thu, 20 Jan 2022 13:05:15 -0800 Subject: [PATCH] formatting fixes --- src/bridge/setup.rs | 10 ++++++++-- src/window/mod.rs | 13 +++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/bridge/setup.rs b/src/bridge/setup.rs index 61e3831..c6a58ed 100644 --- a/src/bridge/setup.rs +++ b/src/bridge/setup.rs @@ -66,8 +66,14 @@ pub async fn setup_neovide_specific_state(nvim: &Neovim, is_remote: b nvim.set_client_info( "neovide", vec![ - (Value::from("major"), Value::from(env!("CARGO_PKG_VERSION_MAJOR"))), - (Value::from("minor"), Value::from(env!("CARGO_PKG_VERSION_MINOR"))), + ( + Value::from("major"), + Value::from(env!("CARGO_PKG_VERSION_MAJOR")), + ), + ( + Value::from("minor"), + Value::from(env!("CARGO_PKG_VERSION_MINOR")), + ), ], "ui", vec![], diff --git a/src/window/mod.rs b/src/window/mod.rs index 094fb35..f551cb6 100644 --- a/src/window/mod.rs +++ b/src/window/mod.rs @@ -339,21 +339,22 @@ pub fn create_window() { let monitor_width = monitor_size.width as i32; let monitor_height = monitor_size.height as i32; - let window_position = window.outer_position().expect("Could not get window position"); + let window_position = window + .outer_position() + .expect("Could not get window position"); let window_size = window.outer_size(); let window_width = window_size.width as i32; let window_height = window_size.height as i32; - if window_position.x + window_width < monitor_position.x || - window_position.y + window_height < monitor_position.y || - window_position.x > monitor_position.x + monitor_width || - window_position.y > monitor_position.y + monitor_height + if window_position.x + window_width < monitor_position.x + || window_position.y + window_height < monitor_position.y + || window_position.x > monitor_position.x + monitor_width + || window_position.y > monitor_position.y + monitor_height { window.set_outer_position(monitor_position); } } - let scale_factor = windowed_context.window().scale_factor(); let renderer = Renderer::new(scale_factor); let saved_inner_size = window.inner_size();