From 3676e2e5d93d63189f2eb5316a3249503c5738de Mon Sep 17 00:00:00 2001 From: Joseph Harrison-Lim Date: Sun, 13 Mar 2022 13:48:38 -0400 Subject: [PATCH] cargo fmt --- helix-term/src/application.rs | 2 +- helix-term/src/commands.rs | 7 ++++++- helix-term/src/ui/editor.rs | 7 ++++++- helix-view/src/editor.rs | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 77e415409..f93a8656f 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -259,7 +259,7 @@ impl Application { pub fn handle_config_events(&mut self, config_event: ConfigEvent) { match config_event { - ConfigEvent::Refresh => { self.refresh_config() } + ConfigEvent::Refresh => self.refresh_config(), ConfigEvent::Update(editor_config) => { let mut app_config = (*self.config.load().clone()).clone(); app_config.editor = editor_config; diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index a9c3aaca5..024019fc0 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -848,7 +848,12 @@ fn goto_window(cx: &mut Context, align: Align) { // - 1 so we have at least one gap in the middle. // a height of 6 with padding of 3 on each side will keep shifting the view back and forth // as we type - let scrolloff = cx.editor.config.load().scrolloff.min(height.saturating_sub(1) / 2); + let scrolloff = cx + .editor + .config + .load() + .scrolloff + .min(height.saturating_sub(1) / 2); let last_line = view.last_line(doc); diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index d8d105960..aede35eb4 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -118,7 +118,12 @@ impl EditorView { let highlights: Box> = if is_focused { Box::new(syntax::merge( highlights, - Self::doc_selection_highlights(doc, view, theme, &editor.config.load().cursor_shape), + Self::doc_selection_highlights( + doc, + view, + theme, + &editor.config.load().cursor_shape, + ), )) } else { Box::new(highlights) diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index df934c007..3d372966b 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -39,7 +39,7 @@ use helix_dap as dap; use serde::{ser::SerializeMap, Deserialize, Deserializer, Serialize}; -use arc_swap::{access::DynAccess}; +use arc_swap::access::DynAccess; fn deserialize_duration_millis<'de, D>(deserializer: D) -> Result where