diff --git a/Cargo.lock b/Cargo.lock index 040fbd6..c2a849e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1741,7 +1741,9 @@ dependencies = [ [[package]] name = "skulpin" -version = "0.4.0" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73dfb92c679296809e97938b7abed2ef9d908de9b5a98da671b265891617f83" dependencies = [ "ash", "cocoa", @@ -2088,9 +2090,9 @@ dependencies = [ [[package]] name = "winit" -version = "0.20.0-alpha5" +version = "0.20.0-alpha6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14fbf7c84c8c1ff9d72982cb382c1a78fbe0f7556f49b1ca98de212d018c5b82" +checksum = "bfa4308ca09f50e2f4688c631c36879521bffc39b949238b288ffd932864acbc" dependencies = [ "android_glue", "bitflags", diff --git a/Cargo.toml b/Cargo.toml index 57b6cd6..592c93d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ euclid = "0.20.7" font-kit = "0.4.0" skribo = { git = "https://github.com/linebender/skribo" } lru = "0.4.3" -skulpin = { path = "../skulpin" } +skulpin = "0.5" derive-new = "0.5" env_logger = "0.7.1" neovim-lib = { git = "https://github.com/daa84/neovim-lib", version = "0.6" } diff --git a/src/keybindings.rs b/src/keybindings.rs index 8161c92..22abddf 100644 --- a/src/keybindings.rs +++ b/src/keybindings.rs @@ -98,7 +98,7 @@ fn append_modifiers(modifiers: ModifiersState, keycode_text: String, special: bo let mut result = keycode_text; let mut special = special; - if modifiers.shift { + if modifiers.shift() { result = match result.as_ref() { "1" => "!".to_string(), "2" => "@".to_string(), @@ -133,15 +133,15 @@ fn append_modifiers(modifiers: ModifiersState, keycode_text: String, special: bo } }; } - if modifiers.ctrl { + if modifiers.ctrl() { special = true; result = format!("C-{}", result); } - if modifiers.alt { + if modifiers.alt() { special = true; result = format!("M-{}", result); } - if modifiers.logo { + if modifiers.logo() { special = true; result = format!("D-{}", result); } diff --git a/src/window.rs b/src/window.rs index 26a48dd..7c58abc 100644 --- a/src/window.rs +++ b/src/window.rs @@ -160,10 +160,7 @@ pub fn ui_loop(editor: Arc>, nvim: Neovim, initial_size: (u64, u64 } } - Event::WindowEvent { - event: WindowEvent::RedrawRequested, - .. - } => { + Event::RedrawRequested { .. } => { frame_start = Instant::now(); if let Err(e) = skulpin_renderer.draw(&window.clone(), |canvas, coordinate_system_helper| { let draw_result = renderer.draw(canvas, coordinate_system_helper);