formatting

macos-click-through
Keith Simmons 5 years ago
parent cebcaa86bc
commit 18d37134c5

@ -21,7 +21,7 @@ pub enum UiCommand {
Drag(u32, u32), Drag(u32, u32),
FocusLost, FocusLost,
FocusGained, FocusGained,
Quit Quit,
} }
impl UiCommand { impl UiCommand {
@ -62,8 +62,7 @@ impl UiCommand {
.await .await
.expect("Focus Gained Failed"), .expect("Focus Gained Failed"),
UiCommand::Quit => { UiCommand::Quit => {
nvim.command("qa!") nvim.command("qa!").await.ok(); // Ignoring result as it won't succeed since the app closed.
.await.ok(); // Ignoring result as it won't succeed since the app closed.
} }
} }
} }

@ -391,7 +391,10 @@ pub fn ui_loop() {
for event in event_pump.poll_iter() { for event in event_pump.poll_iter() {
match event { match event {
Event::Quit { .. } => window.handle_quit(), Event::Quit { .. } => window.handle_quit(),
Event::KeyDown { keycode: received_keycode, .. } => { Event::KeyDown {
keycode: received_keycode,
..
} => {
keycode = received_keycode; keycode = received_keycode;
} }
Event::TextInput { text, .. } => keytext = Some(text), Event::TextInput { text, .. } => keytext = Some(text),

Loading…
Cancel
Save