cargo format

macos-click-through
Keith Simmons 5 years ago
parent a146c1aaa3
commit 52e0fcd54a

@ -25,10 +25,10 @@ impl Handler for NeovimHandler {
task::spawn_blocking(move || match event_name.as_ref() { task::spawn_blocking(move || match event_name.as_ref() {
"redraw" => { "redraw" => {
handle_redraw_event_group(arguments); handle_redraw_event_group(arguments);
}, }
"setting_changed" => { "setting_changed" => {
SETTINGS.handle_changed_notification(arguments); SETTINGS.handle_changed_notification(arguments);
}, }
_ => {} _ => {}
}) })
.await .await

@ -46,7 +46,7 @@ impl UiCommand {
.await .await
.expect("Mouse Input Failed"); .expect("Mouse Input Failed");
} }
}, }
UiCommand::Scroll { UiCommand::Scroll {
direction, direction,
position: (grid_x, grid_y), position: (grid_x, grid_y),
@ -56,14 +56,14 @@ impl UiCommand {
.await .await
.expect("Mouse Scroll Failed"); .expect("Mouse Scroll Failed");
} }
}, }
UiCommand::Drag(grid_x, grid_y) => { UiCommand::Drag(grid_x, grid_y) => {
if { EDITOR.lock().mouse_enabled } { if { EDITOR.lock().mouse_enabled } {
nvim.input_mouse("left", "drag", "", 0, grid_y as i64, grid_x as i64) nvim.input_mouse("left", "drag", "", 0, grid_y as i64, grid_x as i64)
.await .await
.expect("Mouse Drag Failed"); .expect("Mouse Drag Failed");
} }
}, }
UiCommand::FocusLost => nvim UiCommand::FocusLost => nvim
.command("if exists('#FocusLost') | doautocmd <nomodeline> FocusLost | endif") .command("if exists('#FocusLost') | doautocmd <nomodeline> FocusLost | endif")
.await .await

@ -70,32 +70,32 @@ impl Editor {
RedrawEvent::OptionSet { gui_option } => self.set_option(gui_option), RedrawEvent::OptionSet { gui_option } => self.set_option(gui_option),
RedrawEvent::ModeChange { mode_index } => { RedrawEvent::ModeChange { mode_index } => {
self.cursor.change_mode(mode_index, &self.defined_styles) self.cursor.change_mode(mode_index, &self.defined_styles)
}, }
RedrawEvent::MouseOn => { RedrawEvent::MouseOn => {
self.mouse_enabled = true; self.mouse_enabled = true;
}, }
RedrawEvent::MouseOff => { RedrawEvent::MouseOff => {
self.mouse_enabled = false; self.mouse_enabled = false;
}, }
RedrawEvent::BusyStart => { RedrawEvent::BusyStart => {
trace!("Cursor off"); trace!("Cursor off");
self.cursor.enabled = false; self.cursor.enabled = false;
}, }
RedrawEvent::BusyStop => { RedrawEvent::BusyStop => {
trace!("Cursor on"); trace!("Cursor on");
self.cursor.enabled = true; self.cursor.enabled = true;
}, }
RedrawEvent::Flush => { RedrawEvent::Flush => {
trace!("Image flushed"); trace!("Image flushed");
REDRAW_SCHEDULER.queue_next_frame(); REDRAW_SCHEDULER.queue_next_frame();
}, }
RedrawEvent::Resize { width, height, .. } => self.grid.resize(width, height), RedrawEvent::Resize { width, height, .. } => self.grid.resize(width, height),
RedrawEvent::DefaultColorsSet { colors } => { RedrawEvent::DefaultColorsSet { colors } => {
self.default_style = Arc::new(Style::new(colors)) self.default_style = Arc::new(Style::new(colors))
}, }
RedrawEvent::HighlightAttributesDefine { id, style } => { RedrawEvent::HighlightAttributesDefine { id, style } => {
self.defined_styles.insert(id, Arc::new(style)); self.defined_styles.insert(id, Arc::new(style));
}, }
RedrawEvent::GridLine { RedrawEvent::GridLine {
row, row,
column_start, column_start,

Loading…
Cancel
Save