From 52e0fcd54ad3fb3085901059f6d6dcddce4d1917 Mon Sep 17 00:00:00 2001 From: Keith Simmons Date: Fri, 10 Apr 2020 13:26:25 -0700 Subject: [PATCH] cargo format --- src/bridge/handler.rs | 4 ++-- src/bridge/ui_commands.rs | 6 +++--- src/editor/mod.rs | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/bridge/handler.rs b/src/bridge/handler.rs index 68b40e5..af2b120 100644 --- a/src/bridge/handler.rs +++ b/src/bridge/handler.rs @@ -25,10 +25,10 @@ impl Handler for NeovimHandler { task::spawn_blocking(move || match event_name.as_ref() { "redraw" => { handle_redraw_event_group(arguments); - }, + } "setting_changed" => { SETTINGS.handle_changed_notification(arguments); - }, + } _ => {} }) .await diff --git a/src/bridge/ui_commands.rs b/src/bridge/ui_commands.rs index c916161..70ef61c 100644 --- a/src/bridge/ui_commands.rs +++ b/src/bridge/ui_commands.rs @@ -46,7 +46,7 @@ impl UiCommand { .await .expect("Mouse Input Failed"); } - }, + } UiCommand::Scroll { direction, position: (grid_x, grid_y), @@ -56,14 +56,14 @@ impl UiCommand { .await .expect("Mouse Scroll Failed"); } - }, + } UiCommand::Drag(grid_x, grid_y) => { if { EDITOR.lock().mouse_enabled } { nvim.input_mouse("left", "drag", "", 0, grid_y as i64, grid_x as i64) .await .expect("Mouse Drag Failed"); } - }, + } UiCommand::FocusLost => nvim .command("if exists('#FocusLost') | doautocmd FocusLost | endif") .await diff --git a/src/editor/mod.rs b/src/editor/mod.rs index 92f48ce..5b6c04b 100644 --- a/src/editor/mod.rs +++ b/src/editor/mod.rs @@ -70,32 +70,32 @@ impl Editor { RedrawEvent::OptionSet { gui_option } => self.set_option(gui_option), RedrawEvent::ModeChange { mode_index } => { self.cursor.change_mode(mode_index, &self.defined_styles) - }, + } RedrawEvent::MouseOn => { self.mouse_enabled = true; - }, + } RedrawEvent::MouseOff => { self.mouse_enabled = false; - }, + } RedrawEvent::BusyStart => { trace!("Cursor off"); self.cursor.enabled = false; - }, + } RedrawEvent::BusyStop => { trace!("Cursor on"); self.cursor.enabled = true; - }, + } RedrawEvent::Flush => { trace!("Image flushed"); REDRAW_SCHEDULER.queue_next_frame(); - }, + } RedrawEvent::Resize { width, height, .. } => self.grid.resize(width, height), RedrawEvent::DefaultColorsSet { colors } => { self.default_style = Arc::new(Style::new(colors)) - }, + } RedrawEvent::HighlightAttributesDefine { id, style } => { self.defined_styles.insert(id, Arc::new(style)); - }, + } RedrawEvent::GridLine { row, column_start,