From a02fdf2b13678ec80f836a8af148ca33795b184a Mon Sep 17 00:00:00 2001 From: Dinesh kumar Date: Sun, 19 May 2024 22:35:31 +0530 Subject: [PATCH 01/33] neovide_scale_factor minor fix (#2570) * neovide_scale_factor minor fix * resolving cargo format fix --- src/window/window_wrapper.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/window/window_wrapper.rs b/src/window/window_wrapper.rs index 8d3166495a..5f8fc42822 100644 --- a/src/window/window_wrapper.rs +++ b/src/window/window_wrapper.rs @@ -469,9 +469,7 @@ impl WinitWindowWrapper { } let scale_factor = window.scale_factor(); - self.renderer - .grid_renderer - .handle_scale_factor_update(scale_factor); + self.renderer.handle_os_scale_factor_change(scale_factor); let mut size = PhysicalSize::default(); match self.initial_window_size { From c4b5097cb437fde47e310f8e69a508f98c1c6e3b Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Mon, 20 May 2024 07:58:46 +0300 Subject: [PATCH 02/33] Require only DXGI 1.2 when not debugging D3D (#2559) --- src/renderer/d3d.rs | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/renderer/d3d.rs b/src/renderer/d3d.rs index 1153f1164f..e08a7ac546 100644 --- a/src/renderer/d3d.rs +++ b/src/renderer/d3d.rs @@ -15,8 +15,6 @@ use windows::Win32::Graphics::Direct3D12::{ D3D12_COMMAND_LIST_TYPE_DIRECT, D3D12_COMMAND_QUEUE_DESC, D3D12_COMMAND_QUEUE_FLAG_NONE, D3D12_FENCE_FLAG_NONE, D3D12_RESOURCE_STATE_PRESENT, }; -#[cfg(feature = "d3d_debug")] -use windows::Win32::Graphics::Direct3D12::{D3D12GetDebugInterface, ID3D12Debug}; use windows::Win32::Graphics::DirectComposition::{ DCompositionCreateDevice2, IDCompositionDevice, IDCompositionTarget, IDCompositionVisual, }; @@ -25,10 +23,15 @@ use windows::Win32::Graphics::Dxgi::Common::{ DXGI_SAMPLE_DESC, }; use windows::Win32::Graphics::Dxgi::{ - CreateDXGIFactory2, IDXGIAdapter1, IDXGIFactory4, IDXGISwapChain1, IDXGISwapChain3, - DXGI_ADAPTER_FLAG, DXGI_ADAPTER_FLAG_SOFTWARE, DXGI_CREATE_FACTORY_DEBUG, DXGI_SCALING_STRETCH, - DXGI_SWAP_CHAIN_DESC1, DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT, - DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, DXGI_USAGE_RENDER_TARGET_OUTPUT, + CreateDXGIFactory1, IDXGIAdapter1, IDXGIFactory2, IDXGISwapChain1, IDXGISwapChain3, + DXGI_ADAPTER_FLAG, DXGI_ADAPTER_FLAG_SOFTWARE, DXGI_SCALING_STRETCH, DXGI_SWAP_CHAIN_DESC1, + DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT, DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, + DXGI_USAGE_RENDER_TARGET_OUTPUT, +}; +#[cfg(feature = "d3d_debug")] +use windows::Win32::Graphics::{ + Direct3D12::{D3D12GetDebugInterface, ID3D12Debug}, + Dxgi::{CreateDXGIFactory2, DXGI_CREATE_FACTORY_DEBUG}, }; use windows::Win32::System::Threading::{CreateEventW, WaitForSingleObjectEx, INFINITE}; use winit::{ @@ -46,7 +49,7 @@ use crate::{ window::UserEvent, }; -fn get_hardware_adapter(factory: &IDXGIFactory4) -> Result { +fn get_hardware_adapter(factory: &IDXGIFactory2) -> Result { tracy_zone!("get_hardware_adapter"); for i in 0.. { let adapter = unsafe { factory.EnumAdapters1(i)? }; @@ -104,7 +107,7 @@ impl D3DSkiaRenderer { pub fn new(window: Window) -> Self { tracy_zone!("D3DSkiaRenderer::new"); #[cfg(feature = "d3d_debug")] - unsafe { + let dxgi_factory: IDXGIFactory2 = unsafe { let mut debug_controller: Option = None; D3D12GetDebugInterface(&mut debug_controller) .expect("Failed to create Direct3D debug controller"); @@ -112,12 +115,14 @@ impl D3DSkiaRenderer { debug_controller .expect("Failed to enable debug layer") .EnableDebugLayer(); - } - let dxgi_factory: IDXGIFactory4 = unsafe { CreateDXGIFactory2(DXGI_CREATE_FACTORY_DEBUG).expect("Failed to create DXGI factory") }; + #[cfg(not(feature = "d3d_debug"))] + let dxgi_factory: IDXGIFactory2 = + unsafe { CreateDXGIFactory1().expect("Failed to create DXGI factory") }; + let adapter = get_hardware_adapter(&dxgi_factory) .expect("Failed to find any suitable Direct3D 12 adapters"); From a5b5ae6f9016d0a3cdf3ec83c2e15bb4db0f54b6 Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Mon, 20 May 2024 19:15:37 +0300 Subject: [PATCH 03/33] fix: Broken IME enable and popup position (#2571) * Apply IME enable status on every event processed For some reason it won't properly get enabled otherwise * Fix the IME position --- src/window/window_wrapper.rs | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/window/window_wrapper.rs b/src/window/window_wrapper.rs index 5f8fc42822..ecf77f1d14 100644 --- a/src/window/window_wrapper.rs +++ b/src/window/window_wrapper.rs @@ -20,7 +20,7 @@ use crate::{ clamped_grid_size, FontSettings, HotReloadConfigs, SettingsChanged, DEFAULT_GRID_SIZE, MIN_GRID_SIZE, SETTINGS, }, - units::{GridPos, GridRect, GridSize, PixelPos, PixelSize}, + units::{GridRect, GridSize, PixelPos, PixelSize}, window::{create_window, PhysicalSize, ShouldRender, WindowSize}, CmdLineSettings, }; @@ -72,7 +72,6 @@ pub struct WinitWindowWrapper { font_changed_last_frame: bool, saved_inner_size: dpi::PhysicalSize, saved_grid_size: Option>, - ime_position: dpi::PhysicalPosition, requested_columns: Option, requested_lines: Option, ui_state: UIState, @@ -102,7 +101,6 @@ impl WinitWindowWrapper { font_changed_last_frame: false, saved_inner_size, saved_grid_size: None, - ime_position: dpi::PhysicalPosition::new(-1, -1), requested_columns: None, requested_lines: None, ui_state: UIState::Initing, @@ -293,6 +291,9 @@ impl WinitWindowWrapper { /// the window should be rendered. pub fn handle_event(&mut self, event: Event) -> bool { tracy_zone!("handle_event", 0); + let window_settings = SETTINGS.get::(); + // For some some reason we have to set the ime every frame, otherwise it won't apply + self.set_ime(window_settings.input_ime); let renderer_asks_to_be_rendered = self.renderer.handle_event(&event); let mut should_render = true; @@ -759,20 +760,21 @@ impl WinitWindowWrapper { let skia_renderer = self.skia_renderer.as_ref().unwrap(); let grid_scale = self.renderer.grid_renderer.grid_scale; let font_dimensions = grid_scale.0; - let mut position = self.renderer.get_cursor_destination(); - position.y += font_dimensions.height; - let position: GridPos = (position / grid_scale).floor().cast(); + let position = self.renderer.get_cursor_destination(); + let position = position.cast(); let position = dpi::PhysicalPosition { x: position.x, y: position.y, }; - if position != self.ime_position { - self.ime_position = position; - skia_renderer.window().set_ime_cursor_area( - dpi::Position::Physical(position), - dpi::PhysicalSize::new(100, font_dimensions.height as u32), - ); - } + // NOTE: some compositors don't like excluding too much and try to render popup at the + // bottom right corner of the provided area, so exclude just the full-width char to not + // obscure the cursor and not render popup at the end of the window. + let width = font_dimensions.width * 2.0; + let height = font_dimensions.height.ceil(); + skia_renderer.window().set_ime_cursor_area( + dpi::Position::Physical(position), + dpi::PhysicalSize::new(width, height), + ); } fn handle_scale_factor_update(&mut self, scale_factor: f64) { From d20c912b197cebd58b60e1e224bd1cc2a52aa5a2 Mon Sep 17 00:00:00 2001 From: Eduard Korchmar Date: Wed, 22 May 2024 11:32:45 +0200 Subject: [PATCH 04/33] docs: Update list of currently available settings (#2583) * docs: Update list of currently available settings Not all of the settings were listed. * Fork: important, as recent release changed the default behaviour and command line option is worded differently; this documented only in code. * Theme: another recently added option * Font: just an example to better explain the expected format * Reorder config options naturally in code and docs --- src/settings/config.rs | 16 ++++++++-------- website/docs/config-file.md | 20 +++++++++++++------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/settings/config.rs b/src/settings/config.rs index 873a10856b..3bc289a04e 100644 --- a/src/settings/config.rs +++ b/src/settings/config.rs @@ -39,19 +39,19 @@ pub fn config_path() -> PathBuf { #[derive(Debug, Deserialize, Default, Clone)] #[serde(rename_all = "kebab-case")] pub struct Config { - pub wsl: Option, - pub no_multigrid: Option, - pub maximized: Option, - pub vsync: Option, - pub srgb: Option, + pub font: Option, pub fork: Option, + pub frame: Option, pub idle: Option, + pub maximized: Option, pub neovim_bin: Option, - pub frame: Option, + pub no_multigrid: Option, + pub srgb: Option, + pub tabs: Option, pub theme: Option, - pub font: Option, pub title_hidden: Option, - pub tabs: Option, + pub vsync: Option, + pub wsl: Option, } #[derive(Debug, Clone, PartialEq)] diff --git a/website/docs/config-file.md b/website/docs/config-file.md index 95ad30614a..75ae60a297 100644 --- a/website/docs/config-file.md +++ b/website/docs/config-file.md @@ -25,16 +25,22 @@ There are two types of settings: Settings currently available in the config file with default values: ```toml -wsl = false -no-multigrid = false -vsync = true -maximized = false -srgb = false +[font] + normal = [] # Will use the bundled Fira Code Nerd Font by default + size = 14.0 + +fork = false +frame = "full" idle = true +maximized = false neovim-bin = "/usr/bin/nvim" # in reality found dynamically on $PATH if unset -frame = "full" -title-hidden = true +no-multigrid = false +srgb = false tabs = true +theme = "auto" +title-hidden = true +vsync = true +wsl = false ``` Settings from environment variables can be found in [Command Line Reference](command-line-reference.md), From 904a573cdbcc319b58d94a4a83fda4294d2887be Mon Sep 17 00:00:00 2001 From: Hawtian Wang Date: Thu, 23 May 2024 01:05:16 +0800 Subject: [PATCH 05/33] fix: group floating window (#2578) --- src/renderer/rendered_layer.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/rendered_layer.rs b/src/renderer/rendered_layer.rs index ac279a973d..7439f704cf 100644 --- a/src/renderer/rendered_layer.rs +++ b/src/renderer/rendered_layer.rs @@ -202,6 +202,7 @@ pub fn group_windows( for i in 0..windows.len() { let _ = get_window_group(&mut windows, i); } + windows.sort_by(|a, b| a.group.cmp(&b.group)); windows .into_iter() .group_by(|window| window.group) From ab78e07a25444c1e9167bd04e9726823683d8611 Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Fri, 24 May 2024 02:40:51 -0700 Subject: [PATCH 06/33] refactor: remove unnecessary casting to `usize` (#2589) --- src/utils/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/test.rs b/src/utils/test.rs index 15dd96efa9..7f0bee3fed 100644 --- a/src/utils/test.rs +++ b/src/utils/test.rs @@ -96,7 +96,7 @@ pub fn points_to_ascii(points: Vec) -> String { let line_width = points.iter().map(|p| p.x as usize).max().unwrap() + 1; let line_count = points.iter().map(|p| p.y as usize).max().unwrap() + 1; - let mut ascii = vec![vec![' '; line_width as usize]; line_count as usize]; + let mut ascii = vec![vec![' '; line_width]; line_count]; let numbers_big_enough = points.len() <= 9; let chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (index, p) in points.iter().enumerate() { From 8eb5073bc616d54bc608a009a1a6135bd168c319 Mon Sep 17 00:00:00 2001 From: Calum Smith Date: Fri, 24 May 2024 12:07:26 -0400 Subject: [PATCH 07/33] fix: Don't use login shell on macOS if `$TERM` is set (#2587) If we assume that having $TERM set means the user is in an interactive terminal session, we can simply run the nvim command directly instead of wrapping it in `/usr/bin/login`, preserving their environment variables. Fixes #2584 --- src/bridge/command.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bridge/command.rs b/src/bridge/command.rs index 0779b74bd6..c2d8bd2e18 100644 --- a/src/bridge/command.rs +++ b/src/bridge/command.rs @@ -49,6 +49,16 @@ fn build_login_cmd_args(command: &str, args: &[&str]) -> (String, Vec) { use crate::error_handling::ResultPanicExplanation; + // If $TERM is set, we assume user is running from a terminal, and we shouldn't + // re-initialize the environment. + // See https://github.com/neovide/neovide/issues/2584 + if env::var_os("TERM").is_some() { + return ( + command.to_string(), + args.iter().map(|s| s.to_string()).collect(), + ); + } + let user = env::var("USER").unwrap_or_explained_panic("USER environment variable not found"); let shell = env::var("SHELL").unwrap_or_else(|_| "/bin/zsh".to_string()); From 7e5a6a22f7ef5c446d6d43e4de9b0f3090250bc4 Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Fri, 24 May 2024 19:14:56 +0300 Subject: [PATCH 08/33] fix: Another attempt to fix the IME not geting properly enabled (#2581) * Set IME allowed status directly after the window creation * Don't set the IME area until the IME system accepts it Also throttle the requests. Before these changes fcitx5 would crash on Wayland all the time, so setting it every frame was clearly not the correct way to fix the problem. I guess the real issue was that setting the area when it was not allowed caused the IME system to go into an invalid state. --- src/window/window_wrapper.rs | 59 +++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/src/window/window_wrapper.rs b/src/window/window_wrapper.rs index ecf77f1d14..e7d40f2e81 100644 --- a/src/window/window_wrapper.rs +++ b/src/window/window_wrapper.rs @@ -35,7 +35,7 @@ use log::trace; use raw_window_handle::{HasRawWindowHandle, RawWindowHandle}; use winit::{ dpi, - event::{Event, WindowEvent}, + event::{Event, Ime, WindowEvent}, event_loop::{EventLoopProxy, EventLoopWindowTarget}, window::{Fullscreen, Theme}, }; @@ -78,6 +78,8 @@ pub struct WinitWindowWrapper { window_padding: WindowPadding, initial_window_size: WindowSize, is_minimized: bool, + ime_enabled: bool, + ime_area: (dpi::PhysicalPosition, dpi::PhysicalSize), pub vsync: Option, #[cfg(target_os = "macos")] pub macos_feature: Option, @@ -113,6 +115,8 @@ impl WinitWindowWrapper { initial_window_size, is_minimized: false, vsync: None, + ime_enabled: false, + ime_area: Default::default(), #[cfg(target_os = "macos")] macos_feature: None, } @@ -291,9 +295,6 @@ impl WinitWindowWrapper { /// the window should be rendered. pub fn handle_event(&mut self, event: Event) -> bool { tracy_zone!("handle_event", 0); - let window_settings = SETTINGS.get::(); - // For some some reason we have to set the ime every frame, otherwise it won't apply - self.set_ime(window_settings.input_ime); let renderer_asks_to_be_rendered = self.renderer.handle_event(&event); let mut should_render = true; @@ -398,6 +399,15 @@ impl WinitWindowWrapper { tracy_zone!("Moved"); vsync.update(skia_renderer.window()); } + WindowEvent::Ime(Ime::Enabled) => { + log::info!("Ime enabled"); + self.ime_enabled = true; + self.update_ime_position(true); + } + WindowEvent::Ime(Ime::Disabled) => { + log::info!("Ime disabled"); + self.ime_enabled = false; + } _ => { tracy_zone!("Unknown WindowEvent"); return false; @@ -460,6 +470,16 @@ impl WinitWindowWrapper { let window_config = create_window(event_loop, maximized, &self.title); let window = &window_config.window; + let WindowSettings { + input_ime, + theme, + transparency, + window_blurred, + .. + } = SETTINGS.get::(); + + window.set_ime_allowed(input_ime); + // It's important that this is created before the window is resized, since it can change the padding and affect the size #[cfg(target_os = "macos")] { @@ -538,14 +558,6 @@ impl WinitWindowWrapper { self.renderer.grid_renderer.grid_scale.0, ); - let WindowSettings { - input_ime, - theme, - transparency, - window_blurred, - .. - } = SETTINGS.get::(); - window.set_blur(window_blurred && transparency < 1.0); match theme.as_str() { @@ -570,9 +582,6 @@ impl WinitWindowWrapper { window.request_redraw(); } - // Ensure that the window has the correct IME state - self.set_ime(input_ime); - self.ui_state = UIState::FirstFrame; self.skia_renderer = Some(skia_renderer); } @@ -654,7 +663,7 @@ impl WinitWindowWrapper { } } - self.update_ime_position(); + self.update_ime_position(false); should_render.update(self.renderer.prepare_frame()); @@ -753,8 +762,8 @@ impl WinitWindowWrapper { }); } - fn update_ime_position(&mut self) { - if self.skia_renderer.is_none() { + fn update_ime_position(&mut self, force: bool) { + if !self.ime_enabled || self.skia_renderer.is_none() { return; } let skia_renderer = self.skia_renderer.as_ref().unwrap(); @@ -769,12 +778,14 @@ impl WinitWindowWrapper { // NOTE: some compositors don't like excluding too much and try to render popup at the // bottom right corner of the provided area, so exclude just the full-width char to not // obscure the cursor and not render popup at the end of the window. - let width = font_dimensions.width * 2.0; - let height = font_dimensions.height.ceil(); - skia_renderer.window().set_ime_cursor_area( - dpi::Position::Physical(position), - dpi::PhysicalSize::new(width, height), - ); + let width = (font_dimensions.width * 2.0).ceil() as u32; + let height = font_dimensions.height.ceil() as u32; + let size = dpi::PhysicalSize::new(width, height); + let area = (position, size); + if force || self.ime_area != area { + self.ime_area = (position, size); + skia_renderer.window().set_ime_cursor_area(position, size); + } } fn handle_scale_factor_update(&mut self, scale_factor: f64) { From e687f163ee10bb3abb495dba3a31782fa1157dde Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Fri, 24 May 2024 19:48:55 +0300 Subject: [PATCH 09/33] Disable inter-layer grouping by default. (#2580) The grouping inside a single layer is still enabled. --- src/renderer/mod.rs | 18 +++++++++++++++--- website/docs/configuration.md | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index 4d0c73834b..c95396c8ec 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -99,6 +99,7 @@ pub struct RendererSettings { underline_stroke_scale: f32, text_gamma: f32, text_contrast: f32, + experimental_layer_grouping: bool, } impl Default for RendererSettings { @@ -119,6 +120,7 @@ impl Default for RendererSettings { underline_stroke_scale: 1., text_gamma: 0.0, text_contrast: 0.5, + experimental_layer_grouping: false, } } } @@ -207,7 +209,10 @@ impl Renderer { let default_background = self.grid_renderer.get_default_background(); let grid_scale = self.grid_renderer.grid_scale; - let transparency = { SETTINGS.get::().transparency }; + let transparency = SETTINGS.get::().transparency; + let layer_grouping = SETTINGS + .get::() + .experimental_layer_grouping; root_canvas.clear(default_background.with_a((255.0 * transparency) as u8)); root_canvas.save(); root_canvas.reset_matrix(); @@ -240,8 +245,15 @@ impl Renderer { for window in floating_windows { let zindex = window.anchor_info.as_ref().unwrap().sort_order; log::debug!("zindex: {}, base: {}", zindex, base_zindex); - // Group floating windows by consecutive z indices - if zindex - last_zindex > 1 && !current_windows.is_empty() { + if layer_grouping { + // Group floating windows by consecutive z indices + if zindex - last_zindex > 1 && !current_windows.is_empty() { + for windows in group_windows(current_windows, grid_scale) { + floating_layers.push(FloatingLayer { windows }); + } + current_windows = vec![]; + } + } else { for windows in group_windows(current_windows, grid_scale) { floating_layers.push(FloatingLayer { windows }); } diff --git a/website/docs/configuration.md b/website/docs/configuration.md index 96b15ba2f3..ca26958b38 100644 --- a/website/docs/configuration.md +++ b/website/docs/configuration.md @@ -417,6 +417,26 @@ Set the [`background`](https://neovim.io/doc/user/options.html#'background') opt starts. Possible values: _light_, _dark_, _auto_. On systems that support it, _auto_ will mirror the system theme, and will update `background` when the system theme changes. +#### Layer grouping + +VimScript: + +```vim +let g:experimental_layer_grouping = v:false +``` + +Lua: + +```lua +vim.g.experimental_layer_grouping = false +``` + +**Available since 0.13.1.** + +Group non-emtpy consecutive layers (zindex) together, so that the shadows and blurring is done for +the whole group instead of each individual layer. This can get rid of some shadowing and blending +artifacts, but cause worse problems like [#2574](https://github.com/neovide/neovide/issues/2574). + ### Functionality #### Refresh Rate From 4d567d726ae8c2e89c6f4aa2a652766955bd0746 Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Fri, 24 May 2024 22:07:02 +0300 Subject: [PATCH 10/33] Release 0.13.1 (#2575) * Update dependencies * Bump version to 0.13.1 --- Cargo.lock | 118 ++++++++++++++++++++++++++--------------------------- Cargo.toml | 6 +-- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 09fcaa681f..520718cbe9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -154,9 +154,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" dependencies = [ "backtrace", ] @@ -196,7 +196,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -245,7 +245,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.64", + "syn 2.0.66", "which 4.4.2", ] @@ -303,13 +303,13 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +checksum = "369cfaf2a5bed5d8f8202073b2e093c9f508251de1551a0deb4253e4c7d80909" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -362,9 +362,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.97" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" dependencies = [ "jobserver", "libc", @@ -461,7 +461,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -570,27 +570,27 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "csscolorparser" @@ -627,7 +627,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -674,9 +674,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "either" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "equivalent" @@ -696,9 +696,9 @@ dependencies = [ [[package]] name = "euclid" -version = "0.22.9" +version = "0.22.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f253bc5c813ca05792837a0ff4b3a580336b224512d48f7eda1d7dd9210787" +checksum = "e0f0eb73b934648cd7a4a61f1b15391cd95dab0b4da6e2e66c2a072c144b4a20" dependencies = [ "num-traits", "serde", @@ -783,7 +783,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -863,7 +863,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -1262,9 +1262,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" @@ -1299,9 +1299,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -1360,9 +1360,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", "simd-adler32", @@ -1392,7 +1392,7 @@ dependencies = [ "ndk-sys", "num_enum", "raw-window-handle 0.5.2", - "raw-window-handle 0.6.1", + "raw-window-handle 0.6.2", "thiserror", ] @@ -1413,7 +1413,7 @@ dependencies = [ [[package]] name = "neovide" -version = "0.13.0" +version = "0.13.1" dependencies = [ "anyhow", "approx", @@ -1630,7 +1630,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -1672,9 +1672,9 @@ dependencies = [ [[package]] name = "objc-sys" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da284c198fb9b7b0603f8635185e85fbd5b64ee154b1ed406d489077de2d6d60" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" @@ -1819,7 +1819,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -1896,7 +1896,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -1910,9 +1910,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" dependencies = [ "unicode-ident", ] @@ -2014,9 +2014,9 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "raw-window-handle" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc3bcbdb1ddfc11e700e62968e6b4cc9c75bb466464ad28fb61c5b2c964418b" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] name = "read-fonts" @@ -2225,7 +2225,7 @@ checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -2270,7 +2270,7 @@ checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -2439,14 +2439,14 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] name = "swash" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ec889a8e0a6fcb91041996c8f1f6be0fe1a09e94478785e07c32ce2bca2d2b" +checksum = "682a612b50baf09e8a039547ecf49e6c155690dcb751b1bcb19c93cdeb3d42d4" dependencies = [ "read-fonts", ] @@ -2464,9 +2464,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.64" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ad3dee41f36859875573074334c200d1add8e4a87bb37113ebd31d926b7b11f" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -2486,22 +2486,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -2598,7 +2598,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -2773,7 +2773,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", "wasm-bindgen-shared", ] @@ -2807,7 +2807,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3041,7 +3041,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -3052,7 +3052,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -3307,7 +3307,7 @@ dependencies = [ "orbclient", "percent-encoding", "raw-window-handle 0.5.2", - "raw-window-handle 0.6.1", + "raw-window-handle 0.6.2", "redox_syscall 0.3.5", "rustix", "sctk-adwaita", @@ -3478,5 +3478,5 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn 2.0.66", ] diff --git a/Cargo.toml b/Cargo.toml index 1b8de500ae..294233e1c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "neovide" -version = "0.13.0" +version = "0.13.1" edition = "2021" build = "build.rs" resolver = "2" @@ -140,9 +140,9 @@ debug = true name = "Neovide" identifier = "com.neovide.neovide" icon = ["assets/neovide.ico"] -version = "0.13.0" +version = "0.13.1" resources = [] -copyright = "Copyright (c) Neovide Contributors 2023. All rights reserved." +copyright = "Copyright (c) Neovide Contributors 2024. All rights reserved." category = "Productivity" short_description = "A simple GUI for Neovim." long_description = """ From 930128b3f0bc3cf443b742257192c585d85c39a4 Mon Sep 17 00:00:00 2001 From: Kyle J Strand Date: Wed, 29 May 2024 20:31:19 -0600 Subject: [PATCH 11/33] fix #2605: indicate that `--no-fork` is now the default behavior (#2606) --- src/cmd_line.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd_line.rs b/src/cmd_line.rs index ee16a80717..f5544779cd 100644 --- a/src/cmd_line.rs +++ b/src/cmd_line.rs @@ -67,11 +67,11 @@ pub struct CmdLineSettings { #[arg(long = "title-hidden", env = "NEOVIDE_TITLE_HIDDEN", value_parser = FalseyValueParser::new())] pub title_hidden: bool, - /// Spawn a child process and leak it [DEFAULT] + /// Spawn a child process and leak it #[arg(long = "fork", env = "NEOVIDE_FORK", action = ArgAction::SetTrue, default_value = "0", value_parser = FalseyValueParser::new())] pub fork: bool, - /// Be "blocking" and let the shell persist as parent process. Takes precedence over `--fork`. + /// Be "blocking" and let the shell persist as parent process. Takes precedence over `--fork`. [DEFAULT] #[arg(long = "no-fork", action = ArgAction::SetTrue, value_parser = FalseyValueParser::new())] _no_fork: bool, From 7e3a371e8f0c32f38c64950e08152439276d1bde Mon Sep 17 00:00:00 2001 From: Calum Smith Date: Fri, 31 May 2024 16:13:54 -0400 Subject: [PATCH 12/33] fix: Position underline correctly with linespace >0 (#2607) Fixes neovide/neovide#2600 --- src/renderer/fonts/caching_shaper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/fonts/caching_shaper.rs b/src/renderer/fonts/caching_shaper.rs index 54e82d519b..faa5b6ce7a 100644 --- a/src/renderer/fonts/caching_shaper.rs +++ b/src/renderer/fonts/caching_shaper.rs @@ -212,7 +212,7 @@ impl CachingShaper { pub fn underline_position(&mut self) -> f32 { let metrics = self.metrics(); - metrics.ascent - metrics.underline_offset + metrics.ascent - metrics.underline_offset + self.linespace / 2. } pub fn stroke_size(&mut self) -> f32 { From 54fd93f53cd841c31a6604bda99573a3be52e839 Mon Sep 17 00:00:00 2001 From: xzbdmw <97848247+xzbdmw@users.noreply.github.com> Date: Sat, 1 Jun 2024 04:30:51 +0800 Subject: [PATCH 13/33] handle scale_factor change early (#2610) Co-authored-by: xzb --- src/renderer/mod.rs | 12 ++---------- src/window/window_wrapper.rs | 8 ++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index c95396c8ec..1bc60672f4 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -154,8 +154,8 @@ pub struct Renderer { pub window_regions: Vec, profiler: profiler::Profiler, - os_scale_factor: f64, - user_scale_factor: f64, + pub os_scale_factor: f64, + pub user_scale_factor: f64, } /// Results of processing the draw commands from the command channel. @@ -393,14 +393,6 @@ impl Renderer { } self.flush(&settings); - let user_scale_factor = SETTINGS.get::().scale_factor.into(); - if user_scale_factor != self.user_scale_factor { - self.user_scale_factor = user_scale_factor; - self.grid_renderer - .handle_scale_factor_update(self.os_scale_factor * self.user_scale_factor); - result.font_changed = true; - } - result } diff --git a/src/window/window_wrapper.rs b/src/window/window_wrapper.rs index e7d40f2e81..3def4d3e92 100644 --- a/src/window/window_wrapper.rs +++ b/src/window/window_wrapper.rs @@ -213,6 +213,14 @@ impl WinitWindowWrapper { WindowSettingsChanged::InputIme(ime_enabled) => { self.set_ime(ime_enabled); } + WindowSettingsChanged::ScaleFactor(user_scale_factor) => { + let renderer = &mut self.renderer; + renderer.user_scale_factor = user_scale_factor.into(); + renderer.grid_renderer.handle_scale_factor_update( + renderer.os_scale_factor * renderer.user_scale_factor, + ); + self.font_changed_last_frame = true; + } WindowSettingsChanged::WindowBlurred(blur) => { if let Some(skia_renderer) = &self.skia_renderer { let WindowSettings { transparency, .. } = SETTINGS.get::(); From 4096e4c3465495ed7bd656edf8fd6db28df9c386 Mon Sep 17 00:00:00 2001 From: xzbdmw <97848247+xzbdmw@users.noreply.github.com> Date: Sat, 1 Jun 2024 04:32:27 +0800 Subject: [PATCH 14/33] Add position_animation_length documentation (#2611) * Add position_animation_length documentation * Update configuration.md --- website/docs/configuration.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/website/docs/configuration.md b/website/docs/configuration.md index ca26958b38..1cd7cfcc3b 100644 --- a/website/docs/configuration.md +++ b/website/docs/configuration.md @@ -318,6 +318,23 @@ Draw a grey border around opaque windows only. Default: `false` +#### Position Animation Length + +VimScript: + +```vim +let g:neovide_position_animation_length = 0.15 +``` + +Lua: + +```lua +vim.g.neovide_position_animation_length = 0.15 +``` + +Determines the time it takes for a window to complete animation from one position to another +position in seconds, such as `:split`. Set to `0` to disable. + #### Scroll Animation Length VimScript: From 425da9fb214e445b34f4212a07f40dcd8b356ac1 Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Sun, 2 Jun 2024 15:13:31 +0300 Subject: [PATCH 15/33] fix: Remove some logspam (#2623) * Don't log WindowDrawCommand errors for non-multigrid Neovim sometimes sends draw commands with grid id, even when multigrid is disabled, so completely ignore those. * Delete prepare_lines logspam --- src/renderer/mod.rs | 16 +++++++++------- src/renderer/rendered_window.rs | 1 - 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index 1bc60672f4..e15923ff40 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -29,6 +29,7 @@ use winit::{ use crate::{ bridge::EditorMode, + cmd_line::CmdLineSettings, editor::{Cursor, Style}, profiling::{tracy_create_gpu_context, tracy_named_frame, tracy_zone}, renderer::rendered_layer::{group_windows, FloatingLayer}, @@ -50,9 +51,6 @@ use skia_safe::graphics::{ #[cfg(feature = "gpu_profiling")] use crate::profiling::GpuCtx; -#[cfg(target_os = "windows")] -use crate::CmdLineSettings; - use cursor_renderer::CursorRenderer; pub use fonts::caching_shaper::CachingShaper; pub use grid_renderer::GridRenderer; @@ -437,10 +435,14 @@ impl Renderer { warn!("ViewportMargins recieved before window was initialized"); } _ => { - error!( - "WindowDrawCommand: {:?} sent for uninitialized grid {}", - command, grid_id - ); + let settings = SETTINGS.get::(); + // Ignore the errors when not using multigrid, since Neovim wrongly sends some of these + if !settings.no_multi_grid { + error!( + "WindowDrawCommand: {:?} sent for uninitialized grid {}", + command, grid_id + ); + } } }, } diff --git a/src/renderer/rendered_window.rs b/src/renderer/rendered_window.rs index 7f481afc32..8619ded0f5 100644 --- a/src/renderer/rendered_window.rs +++ b/src/renderer/rendered_window.rs @@ -671,7 +671,6 @@ impl RenderedWindow { } pub fn prepare_lines(&mut self, grid_renderer: &mut GridRenderer, force: bool) { - log::trace!("prepare_lines force: {force}"); let scroll_offset_lines = self.scroll_animation.position.floor() as isize; let height = self.grid_size.height as isize; if height == 0 { From 5f9065f721e9708c6aecdde5f202b82cc2ac6b3c Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Sun, 2 Jun 2024 15:13:45 +0300 Subject: [PATCH 16/33] feat: Provide a neovide_version variable (#2622) * Provide the patch version to the channel info * Set a neovide_version variable * Update the documentation --- lua/init.lua | 2 ++ src/bridge/setup.rs | 8 ++++++++ website/docs/configuration.md | 20 ++++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/lua/init.lua b/lua/init.lua index 48aa4c02b3..8c854af830 100644 --- a/lua/init.lua +++ b/lua/init.lua @@ -1,5 +1,6 @@ ---@class Args ---@field neovide_channel_id integer +---@field neovide_version string ---@field register_clipboard boolean ---@field register_right_click boolean ---@field enable_focus_command boolean @@ -11,6 +12,7 @@ local args = ... vim.g.neovide_channel_id = args.neovide_channel_id +vim.g.neovide_version = args.neovide_version -- Set some basic rendering options. vim.o.lazyredraw = false diff --git a/src/bridge/setup.rs b/src/bridge/setup.rs index 6da3110f9b..e8fba7b7b6 100644 --- a/src/bridge/setup.rs +++ b/src/bridge/setup.rs @@ -46,6 +46,10 @@ pub async fn setup_neovide_specific_state( Value::from("minor"), Value::from(env!("CARGO_PKG_VERSION_MINOR")), ), + ( + Value::from("patch"), + Value::from(env!("CARGO_PKG_VERSION_PATCH")), + ), ], "ui", vec![], @@ -78,6 +82,10 @@ pub async fn setup_neovide_specific_state( Value::from("neovide_channel_id"), Value::from(api_information.channel), ), + ( + Value::from("neovide_version"), + Value::from(crate_version!()), + ), ( Value::from("register_clipboard"), Value::from(register_clipboard), diff --git a/website/docs/configuration.md b/website/docs/configuration.md index 1cd7cfcc3b..f281f25c4c 100644 --- a/website/docs/configuration.md +++ b/website/docs/configuration.md @@ -28,6 +28,26 @@ if vim.g.neovide then end ``` +You can also query the version with: + +```vim +echo g:neovide_version +``` + +Lua: + +```lua +vim.print(vim.g.neovide_version) +``` + +Or inspect the more detailed channel information: + +Lua: + +```lua +lua vim.print(vim.api.nvim_get_chan_info(vim.g.neovide_channel_id)) +``` + ### Display #### Font From 9f3260022938ebf1fab6d5206cb690b4d239318d Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Sun, 2 Jun 2024 15:14:11 +0300 Subject: [PATCH 17/33] fix: Neovide --version and Neovide --help (#2621) * Change the setting initialization order So that the error window can be displayed properly * Initialize the clipboard earlier This ensures that it's initialized before the error window is shown. * Output command line parsing errors to std streams --- Cargo.toml | 1 + src/error_handling.rs | 30 ++++++++++++++---------------- src/main.rs | 10 ++++++---- src/window/settings.rs | 4 +--- src/windows_utils.rs | 12 ++++++++++-- 5 files changed, 32 insertions(+), 25 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 294233e1c7..7d1c84bdb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,6 +95,7 @@ windows = { version = "0.56.0", features = [ "Win32_Graphics_Dxgi", "Win32_Graphics_Dxgi_Common", "Win32_Security", + "Win32_System_Console", "Win32_System_Performance", "Win32_System_Threading", "Win32_UI_HiDpi", diff --git a/src/error_handling.rs b/src/error_handling.rs index ecb01daef5..876f2c1903 100644 --- a/src/error_handling.rs +++ b/src/error_handling.rs @@ -9,6 +9,9 @@ use itertools::Itertools; use log::error; use winit::{error::EventLoopError, event_loop::EventLoop}; +#[cfg(target_os = "windows")] +use crate::windows_attach_to_console; + use crate::{ bridge::{send_ui, ParallelCommand}, running_tracker::RUNNING_TRACKER, @@ -65,28 +68,23 @@ This is the error that caused the crash. In case you don't know what to do with } fn handle_terminal_startup_errors(err: Error) -> i32 { - if let Some(clap_error) = err.downcast_ref::() { - let _ = clap_error.print(); - clap_error.exit_code() - } else { - eprintln!("{}", &format_and_log_error_message(err)); - 1 - } + eprintln!("{}", &format_and_log_error_message(err)); + 1 } fn handle_gui_startup_errors(err: Error, event_loop: EventLoop) -> i32 { - if let Some(clap_error) = err.downcast_ref::() { - let text = clap_error.render().to_string(); - show_error_window(&text, event_loop); - clap_error.exit_code() - } else { - show_error_window(&format_and_log_error_message(err), event_loop); - 1 - } + show_error_window(&format_and_log_error_message(err), event_loop); + 1 } pub fn handle_startup_errors(err: Error, event_loop: EventLoop) -> i32 { - if stdout().is_terminal() { + // Command line output is always printed to the stdout/stderr + if let Some(clap_error) = err.downcast_ref::() { + #[cfg(target_os = "windows")] + windows_attach_to_console(); + let _ = clap_error.print(); + clap_error.exit_code() + } else if stdout().is_terminal() { handle_terminal_startup_errors(err) } else { handle_gui_startup_errors(err, event_loop) diff --git a/src/main.rs b/src/main.rs index 6dcc7fe847..35ce75ce61 100644 --- a/src/main.rs +++ b/src/main.rs @@ -91,11 +91,11 @@ fn main() -> NeovideExitCode { } let event_loop = create_event_loop(); + clipboard::init(&event_loop); match setup(event_loop.create_proxy()) { Err(err) => handle_startup_errors(err, event_loop).into(), Ok((window_size, font_settings, _runtime)) => { - clipboard::init(&event_loop); main_loop(window_size, font_settings, event_loop).into() } } @@ -173,6 +173,11 @@ fn setup( // // The Window event loop sends UICommand to the bridge, which forwards them to Neovim. It also // reads `DrawCommand`, `SettingChanged`, and `WindowCommand` from the other components. + + SETTINGS.register::(); + SETTINGS.register::(); + SETTINGS.register::(); + let config = Config::init(); Config::watch_config_file(config.clone(), proxy.clone()); @@ -188,9 +193,6 @@ fn setup( trace!("Neovide version: {}", crate_version!()); - SETTINGS.register::(); - SETTINGS.register::(); - SETTINGS.register::(); let window_settings = load_last_window_settings().ok(); let window_size = determine_window_size(window_settings.as_ref()); let grid_size = match window_size { diff --git a/src/window/settings.rs b/src/window/settings.rs index 430310f343..4ac17908a2 100644 --- a/src/window/settings.rs +++ b/src/window/settings.rs @@ -1,13 +1,12 @@ #[cfg(target_os = "macos")] use {log::error, rmpv::Value}; -use crate::{cmd_line::CmdLineSettings, settings::*}; +use crate::settings::*; #[derive(Clone, SettingGroup, PartialEq)] pub struct WindowSettings { pub refresh_rate: u64, pub refresh_rate_idle: u64, - pub idle: bool, pub transparency: f32, pub window_blurred: bool, pub scale_factor: f32, @@ -50,7 +49,6 @@ impl Default for WindowSettings { iso_layout: false, refresh_rate: 60, refresh_rate_idle: 5, - idle: SETTINGS.get::().idle, remember_window_size: true, remember_window_position: true, hide_mouse_when_typing: false, diff --git a/src/windows_utils.rs b/src/windows_utils.rs index 366be9ccdc..4a98129498 100644 --- a/src/windows_utils.rs +++ b/src/windows_utils.rs @@ -1,5 +1,6 @@ -use windows::Win32::UI::HiDpi::{ - SetProcessDpiAwarenessContext, DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2, +use windows::Win32::{ + System::Console::{AttachConsole, ATTACH_PARENT_PROCESS}, + UI::HiDpi::{SetProcessDpiAwarenessContext, DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2}, }; use windows_registry::{Result, CURRENT_USER}; @@ -78,3 +79,10 @@ pub fn windows_fix_dpi() { .expect("Failed to set DPI awareness!"); } } + +pub fn windows_attach_to_console() { + // Attach to parent console tip found here: https://github.com/rust-lang/rust/issues/67159#issuecomment-987882771 + unsafe { + AttachConsole(ATTACH_PARENT_PROCESS).ok(); + } +} From a0241803f26176b5baa97294f005f3c4f2b13c38 Mon Sep 17 00:00:00 2001 From: Serhii Tereshchenko Date: Sun, 2 Jun 2024 17:07:39 +0300 Subject: [PATCH 18/33] chore: Remove obsolete `--no-fork` arguments (#2625) --- src/main.rs | 1 - website/docs/editing-with-external-tools.md | 2 +- website/docs/troubleshooting.md | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 35ce75ce61..b74fdc897e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -248,7 +248,6 @@ fn maybe_disown() { .stdin(process::Stdio::null()) .stdout(process::Stdio::null()) .stderr(process::Stdio::null()) - .arg("--no-fork") .args(env::args().skip(1)) .spawn() .is_ok()); diff --git a/website/docs/editing-with-external-tools.md b/website/docs/editing-with-external-tools.md index 7cfd408021..304f47f6e2 100644 --- a/website/docs/editing-with-external-tools.md +++ b/website/docs/editing-with-external-tools.md @@ -11,7 +11,7 @@ your own responsibility._ In your configuration file: ```yaml -editor: "neovide --no-fork" +editor: "neovide" ``` ...as `jrnl` saves & removes the temporary file as soon as the main process exits, which happens diff --git a/website/docs/troubleshooting.md b/website/docs/troubleshooting.md index e089895b5e..b7557105a0 100644 --- a/website/docs/troubleshooting.md +++ b/website/docs/troubleshooting.md @@ -83,7 +83,7 @@ be very fast. If not, it will build Neovide first. You have to specify ```sh cd [neovide-source-dir] - cargo run --profile profiling --features profiling -- --no-fork [neovide-arguments...] + cargo run --profile profiling --features profiling -- [neovide-arguments...] ``` Now do whatever leads to performance issue in Neovide and exit. From 1db63d93b18cc1eb5ac5b3e67b3ca63505f10800 Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Mon, 3 Jun 2024 03:14:35 +0300 Subject: [PATCH 19/33] fix: emulate Neovim layer drawing (#2612) * Fix the experimental_layer_grouping option * Sort the floating windows the same way as Neovim * Use intersects instead of contains for the layer grouping * Remove custom blending inside a rendered layer The normal Neovim terminal mode blending is now applied instead. * Simplify the transparency calculation * Remove shadow drawing code from root windows --- src/bridge/events.rs | 8 +-- src/editor/mod.rs | 78 ++++++++++++++++++++--- src/renderer/mod.rs | 45 +++---------- src/renderer/rendered_layer.rs | 31 ++------- src/renderer/rendered_window.rs | 109 ++++---------------------------- 5 files changed, 101 insertions(+), 170 deletions(-) diff --git a/src/bridge/events.rs b/src/bridge/events.rs index abb7f49664..2eeeda8beb 100644 --- a/src/bridge/events.rs +++ b/src/bridge/events.rs @@ -209,7 +209,7 @@ pub enum RedrawEvent { anchor_column: f64, #[allow(unused)] focusable: bool, - sort_order: Option, + z_index: u64, }, #[allow(unused)] WindowExternalPosition { @@ -677,8 +677,8 @@ fn parse_window_anchor(value: Value) -> Result { } fn parse_win_float_pos(win_float_pos_arguments: Vec) -> Result { - let ([grid, _window, anchor, anchor_grid, anchor_row, anchor_column, focusable], [sort_order]) = - extract_values_with_optional(win_float_pos_arguments)?; + let [grid, _window, anchor, anchor_grid, anchor_row, anchor_column, focusable, z_index] = + extract_values(win_float_pos_arguments)?; Ok(RedrawEvent::WindowFloatPosition { grid: parse_u64(grid)?, @@ -687,7 +687,7 @@ fn parse_win_float_pos(win_float_pos_arguments: Vec) -> Result std::cmp::Ordering { + // The windows are sorted primarily by z_index, and inside the z_index by + // composition_order. The composition_order is the window creation order with the special + // case that every time a floating window is activated it gets the highest priority for + // its z_index. + let a = (self.z_index, (self.composition_order as i64)); + let b = (other.z_index, (other.composition_order as i64)); + a.cmp(&b) + } +} + +impl PartialOrd for SortOrder { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + #[derive(Clone, Debug, PartialEq)] pub struct AnchorInfo { pub anchor_grid_id: u64, pub anchor_type: WindowAnchor, pub anchor_left: f64, pub anchor_top: f64, - pub sort_order: u64, + pub sort_order: SortOrder, } impl WindowAnchor { @@ -69,6 +93,7 @@ pub struct Editor { pub current_mode_index: Option, pub ui_ready: bool, event_loop_proxy: EventLoopProxy, + composition_order: u64, } impl Editor { @@ -82,6 +107,7 @@ impl Editor { current_mode_index: None, ui_ready: false, event_loop_proxy, + composition_order: 0, } } @@ -245,23 +271,28 @@ impl Editor { anchor_grid, anchor_column: anchor_left, anchor_row: anchor_top, - sort_order, + z_index, .. } => { tracy_zone!("EditorWindowFloatPosition"); + self.composition_order += 1; self.set_window_float_position( grid, anchor_grid, anchor, anchor_left, anchor_top, - sort_order, + SortOrder { + z_index, + composition_order: self.composition_order, + }, ) } RedrawEvent::WindowHide { grid } => { tracy_zone!("EditorWindowHide"); - let window = self.windows.get(&grid); + let window = self.windows.get_mut(&grid); if let Some(window) = window { + window.anchor_info = None; window.hide(); } } @@ -335,7 +366,7 @@ impl Editor { let anchor_type = anchor_info.anchor_type.clone(); let anchor_left = anchor_info.anchor_left; let anchor_top = anchor_info.anchor_top; - let sort_order = Some(anchor_info.sort_order); + let sort_order = anchor_info.sort_order.clone(); self.set_window_float_position( grid, anchor_grid_id, @@ -389,7 +420,7 @@ impl Editor { anchor_type: WindowAnchor, anchor_left: f64, anchor_top: f64, - sort_order: Option, + sort_order: SortOrder, ) { if anchor_grid == grid { warn!("NeoVim requested a window to float relative to itself. This is not supported."); @@ -408,13 +439,25 @@ impl Editor { modified_top += parent_top; } + // Only update the sort order if it's the first position request (no anchor_info), or + // the z_index changes + let sort_order = if let Some(anchor_info) = &window.anchor_info { + if sort_order.z_index == anchor_info.sort_order.z_index { + anchor_info.sort_order.clone() + } else { + sort_order + } + } else { + sort_order + }; + window.position( Some(AnchorInfo { anchor_grid_id: anchor_grid, anchor_type, anchor_left, anchor_top, - sort_order: sort_order.unwrap_or(grid), + sort_order, }), (width, height), (modified_left, modified_top), @@ -426,6 +469,7 @@ impl Editor { } fn set_message_position(&mut self, grid: u64, grid_top: u64, scrolled: bool) { + let z_index = 250; // From the Neovim source code let parent_width = self .windows .get(&1) @@ -437,7 +481,10 @@ impl Editor { anchor_type: WindowAnchor::NorthWest, anchor_left: 0.0, anchor_top: grid_top as f64, - sort_order: u64::MAX, + sort_order: SortOrder { + z_index, + composition_order: self.composition_order, + }, }; if let Some(window) = self.windows.get_mut(&grid) { @@ -488,10 +535,23 @@ impl Editor { } fn set_cursor_position(&mut self, grid: u64, grid_left: u64, grid_top: u64) { + let mut window = self.windows.get_mut(&grid); + if let Some(window) = &mut window { + if let Some(anchor) = window.anchor_info.as_mut() { + // Neovim moves a window to the top of the layer each time the cursor enters it, so do the same here as well + self.composition_order += 1; + anchor.sort_order.composition_order = self.composition_order; + self.draw_command_batcher.queue(DrawCommand::Window { + grid_id: grid, + command: WindowDrawCommand::SortOrder(anchor.sort_order.clone()), + }); + } + } + if let Some(Window { window_type: WindowType::Message { .. }, .. - }) = self.windows.get(&grid) + }) = window { // When the user presses ":" to type a command, the cursor is sent to the gutter // in position 1 (right after the ":"). In all other cases, we want to skip diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index e15923ff40..99f04b9c1e 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -241,21 +241,17 @@ impl Renderer { let mut current_windows = vec![]; for window in floating_windows { - let zindex = window.anchor_info.as_ref().unwrap().sort_order; + let zindex = window.anchor_info.as_ref().unwrap().sort_order.z_index; log::debug!("zindex: {}, base: {}", zindex, base_zindex); - if layer_grouping { - // Group floating windows by consecutive z indices - if zindex - last_zindex > 1 && !current_windows.is_empty() { + if !current_windows.is_empty() && zindex != last_zindex { + // Group floating windows by consecutive z indices if layer_grouping is enabled, + // Otherwise group all windows inside a single layer + if !layer_grouping || zindex - last_zindex > 1 { for windows in group_windows(current_windows, grid_scale) { floating_layers.push(FloatingLayer { windows }); } current_windows = vec![]; } - } else { - for windows in group_windows(current_windows, grid_scale) { - floating_layers.push(FloatingLayer { windows }); - } - current_windows = vec![]; } if current_windows.is_empty() { @@ -278,7 +274,7 @@ impl Renderer { layer .windows .iter() - .map(|w| (w.id, w.anchor_info.as_ref().unwrap().sort_order)) + .map(|w| (w.id, w.anchor_info.as_ref().unwrap().sort_order.clone())) .collect_vec() ); } @@ -292,7 +288,6 @@ impl Renderer { .map(|window| { window.draw( root_canvas, - &settings, default_background.with_a((255.0 * transparency) as u8), grid_scale, ) @@ -492,31 +487,9 @@ impl Renderer { /// Defines how floating windows are sorted. fn floating_sort(window_a: &&mut RenderedWindow, window_b: &&mut RenderedWindow) -> Ordering { - // First, compare floating order - let mut ord = window_a - .anchor_info - .as_ref() - .unwrap() - .sort_order - .partial_cmp(&window_b.anchor_info.as_ref().unwrap().sort_order) - .unwrap(); - if ord == Ordering::Equal { - // if equal, compare grid pos x - ord = window_a - .grid_current_position - .x - .partial_cmp(&window_b.grid_current_position.x) - .unwrap(); - if ord == Ordering::Equal { - // if equal, compare grid pos z - ord = window_a - .grid_current_position - .y - .partial_cmp(&window_b.grid_current_position.y) - .unwrap(); - } - } - ord + let orda = &window_a.anchor_info.as_ref().unwrap().sort_order; + let ordb = &window_b.anchor_info.as_ref().unwrap().sort_order; + orda.cmp(ordb) } pub enum WindowConfigType { diff --git a/src/renderer/rendered_layer.rs b/src/renderer/rendered_layer.rs index 7439f704cf..0227c8002e 100644 --- a/src/renderer/rendered_layer.rs +++ b/src/renderer/rendered_layer.rs @@ -3,7 +3,7 @@ use skia_safe::{ canvas::SaveLayerRec, image_filters::blur, utils::shadow_utils::{draw_shadow, ShadowFlags}, - BlendMode, Canvas, ClipOp, Color, Contains, Paint, Path, PathOp, Point3, Rect, + BlendMode, Canvas, ClipOp, Color, Paint, Path, PathOp, Point3, Rect, }; use crate::units::{to_skia_rect, GridScale, PixelRect}; @@ -82,22 +82,12 @@ impl<'w> FloatingLayer<'w> { .map(|window| window.pixel_region(grid_scale)) .collect::>(); - let blend = self.uniform_background_blend(); - - self.windows.iter_mut().for_each(|window| { - window.update_blend(blend); - }); - let mut ret = vec![]; (0..self.windows.len()).for_each(|i| { let window = &mut self.windows[i]; window.draw_background_surface(root_canvas, regions[i], grid_scale); - }); - (0..self.windows.len()).for_each(|i| { - let window = &mut self.windows[i]; window.draw_foreground_surface(root_canvas, regions[i], grid_scale); - ret.push(WindowDrawDetails { id: window.id, region: regions[i], @@ -111,14 +101,6 @@ impl<'w> FloatingLayer<'w> { ret } - pub fn uniform_background_blend(&self) -> u8 { - self.windows - .iter() - .filter_map(|window| window.get_smallest_blend_value()) - .min() - .unwrap_or(0) - } - fn _draw_shadow(&self, root_canvas: &Canvas, path: &Path, settings: &RendererSettings) { if !settings.floating_shadow { return; @@ -160,18 +142,15 @@ fn get_window_group(windows: &mut Vec, index: usize) -> usize { windows[index].group } -fn rect_contains(a: &Rect, b: &Rect) -> bool { - Rect::contains(a, b) || Rect::contains(b, a) -} - fn group_windows_with_regions(windows: &mut Vec, regions: &[PixelRect]) { + // intersects does not consider touching regions as intersection, so extend the box by one + // pixel before doing the test. + let epsilon = 1.0; for i in 0..windows.len() { for j in i + 1..windows.len() { let group_i = get_window_group(windows, i); let group_j = get_window_group(windows, j); - if group_i != group_j - && rect_contains(&to_skia_rect(®ions[i]), &to_skia_rect(®ions[j])) - { + if group_i != group_j && regions[i].inflate(epsilon, epsilon).intersects(®ions[j]) { let new_group = group_i.min(group_j); if group_i != group_j { windows[group_i].group = new_group; diff --git a/src/renderer/rendered_window.rs b/src/renderer/rendered_window.rs index 8619ded0f5..f32eb2984b 100644 --- a/src/renderer/rendered_window.rs +++ b/src/renderer/rendered_window.rs @@ -1,14 +1,12 @@ use std::{cell::RefCell, rc::Rc, sync::Arc}; use skia_safe::{ - canvas::SaveLayerRec, - utils::shadow_utils::{draw_shadow, ShadowFlags}, - BlendMode, Canvas, ClipOp, Color, Matrix, Paint, Path, Picture, PictureRecorder, Point3, Rect, + canvas::SaveLayerRec, BlendMode, Canvas, Color, Matrix, Paint, Picture, PictureRecorder, Rect, }; use crate::{ cmd_line::CmdLineSettings, - editor::{AnchorInfo, Style, WindowType}, + editor::{AnchorInfo, SortOrder, Style, WindowType}, profiling::{tracy_plot, tracy_zone}, renderer::{animation_utils::*, GridRenderer, RendererSettings}, settings::SETTINGS, @@ -63,6 +61,7 @@ pub enum WindowDrawCommand { left: u64, right: u64, }, + SortOrder(SortOrder), } #[derive(Clone)] @@ -70,7 +69,7 @@ struct Line { line_fragments: Vec, background_picture: Option, foreground_picture: Option, - blend: u8, + has_transparency: bool, is_valid: bool, } @@ -93,8 +92,6 @@ pub struct RenderedWindow { position_t: f32, pub scroll_animation: CriticallyDampedSpringAnimation, - - has_transparency: bool, } #[derive(Clone, Debug)] @@ -113,19 +110,6 @@ impl WindowDrawDetails { } } -impl Line { - fn update_background_blend(&mut self, blend: u8) { - if self.blend != blend { - self.blend = blend; - self.is_valid = false; - } - } - - fn has_transparency(&self) -> bool { - self.blend > 0 - } -} - impl RenderedWindow { pub fn new(id: u64, grid_position: GridPos, grid_size: GridSize) -> RenderedWindow { RenderedWindow { @@ -147,8 +131,6 @@ impl RenderedWindow { position_t: 2.0, // 2.0 is out of the 0.0 to 1.0 range and stops animation. scroll_animation: CriticallyDampedSpringAnimation::new(), - - has_transparency: false, } } @@ -157,13 +139,6 @@ impl RenderedWindow { * grid_scale } - pub fn update_blend(&self, blend: u8) { - for (_, line) in self.iter_lines() { - let mut line = line.borrow_mut(); - line.update_background_blend(blend); - } - } - fn get_target_position(&self, grid_rect: &GridRect) -> GridPos { let destination = self.grid_destination + grid_rect.min.to_vector(); @@ -240,8 +215,6 @@ impl RenderedWindow { pixel_region: PixelRect, grid_scale: GridScale, ) { - let mut has_transparency = false; - let inner_region = self.inner_region(pixel_region, grid_scale); canvas.save(); @@ -249,7 +222,6 @@ impl RenderedWindow { for (matrix, line) in self.iter_border_lines_with_transform(pixel_region, grid_scale) { let line = line.borrow(); if let Some(background_picture) = &line.background_picture { - has_transparency |= line.has_transparency(); canvas.draw_picture(background_picture, Some(&matrix), None); } } @@ -259,7 +231,6 @@ impl RenderedWindow { for (matrix, line) in self.iter_scrollable_lines_with_transform(pixel_region, grid_scale) { let line = line.borrow(); if let Some(background_picture) = &line.background_picture { - has_transparency |= line.has_transparency(); canvas.draw_picture(background_picture, Some(&matrix), None); pics += 1; } @@ -272,8 +243,6 @@ impl RenderedWindow { ); canvas.restore(); canvas.restore(); - - self.has_transparency = has_transparency; } pub fn draw_foreground_surface( @@ -309,49 +278,18 @@ impl RenderedWindow { scroll_offset_lines..scroll_offset_lines + self.grid_size.height as isize + 1, ) .flatten() - .any(|line| line.borrow().has_transparency()) + .any(|line| line.borrow().has_transparency) } pub fn draw( &mut self, root_canvas: &Canvas, - settings: &RendererSettings, default_background: Color, grid_scale: GridScale, ) -> WindowDrawDetails { let pixel_region_box = self.pixel_region(grid_scale); let pixel_region = to_skia_rect(&pixel_region_box); - if self.anchor_info.is_some() && settings.floating_shadow { - root_canvas.save(); - let shadow_path = Path::rect(pixel_region, None); - // We clip using the Difference op to make sure that the shadow isn't rendered inside - // the window itself. - root_canvas.clip_path(&shadow_path, Some(ClipOp::Difference), None); - // The light angle is specified in degrees from the vertical, so we first convert them - // to radians and then use sin/cos to get the y and z components of the light - let light_angle_radians = settings.light_angle_degrees.to_radians(); - draw_shadow( - root_canvas, - &shadow_path, - // Specifies how far from the root canvas the shadow casting rect is. We just use - // the z component here to set it a constant distance away. - Point3::new(0., 0., settings.floating_z_height), - // Because we use the DIRECTIONAL_LIGHT shadow flag, this specifies the angle that - // the light is coming from. - Point3::new(0., -light_angle_radians.sin(), light_angle_radians.cos()), - // This is roughly equal to the apparent radius of the light . - 5., - Color::from_argb((0.03 * 255.) as u8, 0, 0, 0), - Color::from_argb((0.35 * 255.) as u8, 0, 0, 0), - // Directional Light flag is necessary to make the shadow render consistently - // across various sizes of floating windows. It effects how the light direction is - // processed. - Some(ShadowFlags::DIRECTIONAL_LIGHT), - ); - root_canvas.restore(); - } - root_canvas.save(); root_canvas.clip_rect(pixel_region, None, Some(false)); @@ -453,7 +391,7 @@ impl RenderedWindow { line_fragments, background_picture: None, foreground_picture: None, - blend: 0, + has_transparency: false, is_valid: false, }; @@ -506,6 +444,11 @@ impl RenderedWindow { WindowDrawCommand::ViewportMargins { top, bottom, .. } => { self.viewport_margins = ViewportMargins { top, bottom } } + WindowDrawCommand::SortOrder(sort_order) => { + if let Some(anchor_info) = self.anchor_info.as_mut() { + anchor_info.sort_order = sort_order; + } + } _ => {} }; } @@ -596,10 +539,6 @@ impl RenderedWindow { }) } - fn iter_lines(&self) -> impl Iterator>)> { - self.iter_border_lines().chain(self.iter_scrollable_lines()) - } - fn iter_scrollable_lines_with_transform( &self, pixel_region: PixelRect, @@ -650,26 +589,6 @@ impl RenderedWindow { to_skia_rect(&adjusted_region) } - pub fn get_smallest_blend_value(&self) -> Option { - let height = self.grid_size.height as isize; - if height == 0 { - return None; - } - let mut smallest_blend_value: Option = None; - - for (_, line) in self.iter_lines() { - let line = line.borrow(); - line.line_fragments.iter().for_each(|f| { - if let Some(style) = &f.style { - smallest_blend_value = - Some(smallest_blend_value.map_or(style.blend, |v| v.min(style.blend))); - } - }); - } - - smallest_blend_value - } - pub fn prepare_lines(&mut self, grid_renderer: &mut GridRenderer, force: bool) { let scroll_offset_lines = self.scroll_animation.position.floor() as isize; let height = self.grid_size.height as isize; @@ -690,7 +609,7 @@ impl RenderedWindow { let grid_rect = Rect::from_wh(line_size.width, line_size.height); let canvas = recorder.begin_recording(grid_rect, None); - let mut blend = 0; + let mut has_transparency = false; let mut custom_background = false; for line_fragment in line.line_fragments.iter() { @@ -708,7 +627,7 @@ impl RenderedWindow { style, ); custom_background |= background_info.custom_color; - blend = blend.min(style.as_ref().map_or(0, |s| s.blend)); + has_transparency |= background_info.transparent; } let background_picture = custom_background.then_some(recorder.finish_recording_as_picture(None).unwrap()); @@ -737,7 +656,7 @@ impl RenderedWindow { line.background_picture = background_picture; line.foreground_picture = foreground_picture; - line.blend = blend; + line.has_transparency = has_transparency; line.is_valid = true; }; From 24fcfc94c30775a6ff08277e76d266d2a1bde62c Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Fri, 21 Jun 2024 11:23:36 -0700 Subject: [PATCH 20/33] style: simplify string formatting (#2640) --- src/bridge/api_info.rs | 2 +- src/bridge/ui_commands.rs | 2 +- src/error_handling.rs | 3 +-- src/renderer/fonts/font_options.rs | 8 +++----- src/settings/config.rs | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/bridge/api_info.rs b/src/bridge/api_info.rs index d82434dd74..2d06e636cd 100644 --- a/src/bridge/api_info.rs +++ b/src/bridge/api_info.rs @@ -16,7 +16,7 @@ impl fmt::Display for ApiInfoParseError { impl<'a> From> for ApiInfoParseError { fn from(value: ValueRef) -> Self { - Self(format!("{}", value)) + Self(format!("{value}")) } } diff --git a/src/bridge/ui_commands.rs b/src/bridge/ui_commands.rs index 2a4fe565d9..a09831c8a4 100644 --- a/src/bridge/ui_commands.rs +++ b/src/bridge/ui_commands.rs @@ -209,7 +209,7 @@ impl ParallelCommand { .map(|_| ()) // We don't care about the result .context("FileDrop failed"), ParallelCommand::SetBackground(background) => nvim - .command(format!("set background={}", background).as_str()) + .command(format!("set background={background}").as_str()) .await .context("SetBackground failed"), ParallelCommand::DisplayAvailableFonts(fonts) => display_available_fonts(nvim, fonts) diff --git a/src/error_handling.rs b/src/error_handling.rs index 876f2c1903..b0e861545f 100644 --- a/src/error_handling.rs +++ b/src/error_handling.rs @@ -60,8 +60,7 @@ fn format_and_log_error_message(err: Error) -> String { Neovide just crashed :( This is the error that caused the crash. In case you don't know what to do with this, please feel free to report this on https://github.com/neovide/neovide/issues! -{:?}", - err +{err:?}" ); log::error!("{}", msg); msg diff --git a/src/renderer/fonts/font_options.rs b/src/renderer/fonts/font_options.rs index 09b5797bb0..7cc83c5a74 100644 --- a/src/renderer/fonts/font_options.rs +++ b/src/renderer/fonts/font_options.rs @@ -408,7 +408,7 @@ impl fmt::Display for FontDescription { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.family)?; if let Some(style) = &self.style { - write!(f, " {}", style)?; + write!(f, " {style}")?; } Ok(()) } @@ -522,8 +522,7 @@ mod tests { assert_eq!( err, INVALID_SIZE_ERR, - "parse err should equal {}, but {}", - INVALID_SIZE_ERR, err, + "parse err should equal {INVALID_SIZE_ERR}, but {err}", ); } @@ -534,8 +533,7 @@ mod tests { assert_eq!( err, INVALID_WIDTH_ERR, - "parse err should equal {}, but {}", - INVALID_WIDTH_ERR, err, + "parse err should equal {INVALID_WIDTH_ERR}, but {err}", ); } diff --git a/src/settings/config.rs b/src/settings/config.rs index 3bc289a04e..331f5e59a8 100644 --- a/src/settings/config.rs +++ b/src/settings/config.rs @@ -160,7 +160,7 @@ fn watcher_thread(init_config: Config, event_loop_proxy: EventLoopProxy Date: Sun, 7 Jul 2024 17:10:50 +0300 Subject: [PATCH 21/33] Run Clippy directly instead of reviewdog (#2685) * Don't use reviewdog Instead run Clippy as a separate job. Note that failures are ignore for nightly builds. * Fix the Github CI cache * Delete unused code to fix Clippy warnings * Install cargo bundle and wix through binstall * Increase CI parallelism --- .github/workflows/build.yml | 70 +++++++++++++++++-------------------- src/utils/mod.rs | 2 -- src/utils/test.rs | 45 ------------------------ 3 files changed, 33 insertions(+), 84 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37349309be..74094531d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,6 @@ jobs: uses: ./.github/workflows/lint-app.yml test: - needs: lint strategy: fail-fast: false matrix: @@ -46,24 +45,13 @@ jobs: - uses: actions/checkout@v4 - name: Setup toolchain - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} - components: clippy - name: Show toolchain info run: cargo --version --verbose - - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Install neovim uses: rhysd/action-setup-vim@v1 with: @@ -75,6 +63,8 @@ jobs: - name: Install cargo-nextest run: cargo binstall -y cargo-nextest + - uses: Swatinem/rust-cache@v2 + - name: Test env: RUST_BACKTRACE: full @@ -93,24 +83,31 @@ jobs: path: | test-results-${{ matrix.os }}-${{ matrix.toolchain }} + clippy: + strategy: + fail-fast: false + matrix: + os: [windows-latest, macOS-12, ubuntu-latest] + toolchain: [stable, nightly] + runs-on: ${{ matrix.os }} - - name: Install Sarif - run: cargo binstall -y clippy-sarif sarif-fmt + steps: + - uses: actions/checkout@v4 - - name: Setup Reviewdog - uses: reviewdog/action-setup@v1 + - name: Setup toolchain + uses: dtolnay/rust-toolchain@master with: - reviewdog_version: latest + toolchain: ${{ matrix.toolchain }} + components: clippy - - name: Run Clippy - run: cargo clippy --all-targets --message-format=json | clippy-sarif | tee clippy.sarif | sarif-fmt - continue-on-error: true + - uses: Swatinem/rust-cache@v2 - - name: Run Clippy Reviewdog - run: cat clippy.sarif | reviewdog -f=sarif -name=clippy -reporter=github-check -filter-mode=file -fail-on-error=true -level=warning - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Show toolchain info + run: cargo --version --verbose + + - name: Run Clippy + run: cargo clippy --all-targets -- -D warnings + continue-on-error: ${{ matrix.toolchain == 'nightly' }} event-upload: needs: test @@ -123,7 +120,6 @@ jobs: path: ${{ github.event_path }} build-deploy: - needs: test strategy: fail-fast: false matrix: @@ -134,25 +130,23 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - name: Setup toolchain + uses: dtolnay/rust-toolchain@master with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + toolchain: stable + + - name: Install Cargo Binstall + uses: cargo-bins/cargo-binstall@main - name: Install dependencies run: | if [[ $RUNNER_OS == "Windows" ]]; then - if ! which cargo-wix; then cargo install cargo-wix; fi + if ! which cargo-wix; then cargo binstall -y cargo-wix; fi elif [[ $RUNNER_OS == "macOS" ]]; then rustup target add x86_64-apple-darwin rustup target add aarch64-apple-darwin - if ! which cargo-bundle; then cargo install cargo-bundle; fi + if ! which cargo-bundle; then cargo binstall -y cargo-bundle; fi elif [[ $RUNNER_OS == "Linux" ]]; then sudo apt-get update @@ -168,6 +162,8 @@ jobs: with: neovim: true + - uses: Swatinem/rust-cache@v2 + - name: Build run: | if [[ $RUNNER_OS == "Windows" ]]; then diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 886fefadd9..87f0bb4cc5 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -3,8 +3,6 @@ mod ring_buffer; mod test; pub use ring_buffer::*; -#[cfg(test)] -pub use test::*; #[cfg(not(target_os = "windows"))] pub fn is_tty() -> bool { diff --git a/src/utils/test.rs b/src/utils/test.rs index 7f0bee3fed..c1df25a0dd 100644 --- a/src/utils/test.rs +++ b/src/utils/test.rs @@ -69,51 +69,6 @@ pub fn ascii_to_points(ascii: &str) -> Vec { .collect() } -pub fn assert_points_eq(actual: Vec, expected_ascii: &str) { - let expected = ascii_to_points(expected_ascii); - if expected.len() != actual.len() || expected.iter().zip(actual.iter()).any(|(a, b)| a != b) { - let actual_ascii = points_to_ascii(actual); - panic!( - indoc! {" - Points do not match - Expected: - {} - Actual: - {} - "}, - expected_ascii, actual_ascii - ); - } -} - -pub fn points_to_ascii(points: Vec) -> String { - if points - .iter() - .any(|point| point.x.fract() != 0.0 || point.y.fract() != 0.) - { - panic!("Points must be integers to render as ascii"); - } - - let line_width = points.iter().map(|p| p.x as usize).max().unwrap() + 1; - let line_count = points.iter().map(|p| p.y as usize).max().unwrap() + 1; - let mut ascii = vec![vec![' '; line_width]; line_count]; - let numbers_big_enough = points.len() <= 9; - let chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - for (index, p) in points.iter().enumerate() { - let char = if numbers_big_enough { - std::char::from_digit(index as u32, 10).unwrap() - } else { - chars.chars().nth(index).expect("Too many points") - }; - ascii[p.y as usize][p.x as usize] = char; - } - ascii - .iter() - .map(|line| line.iter().collect::()) - .collect::>() - .join("\n") -} - #[test] fn ascii_to_rect_works() { // Single rect From cd7628c570f89bba54407c78ec31cf7ad27aec7e Mon Sep 17 00:00:00 2001 From: Geobert Quach Date: Sun, 7 Jul 2024 17:31:02 +0100 Subject: [PATCH 22/33] fix: C-Space was not mappable on Windows (#2672) * fix: C-Space was not mappable on Windows Fixes https://github.com/neovide/neovide/issues/2669 * fix: apply clippy --- src/window/keyboard_manager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window/keyboard_manager.rs b/src/window/keyboard_manager.rs index 26e642a7c7..bef6b8bcd8 100644 --- a/src/window/keyboard_manager.rs +++ b/src/window/keyboard_manager.rs @@ -301,7 +301,7 @@ fn get_special_key(key_event: &KeyEvent) -> Option<&str> { NamedKey::Space => { // Space can finish a dead key sequence, so treat space as a special key only when // that doesn't happen. - if key_event.text == Some(" ".into()) { + if key_event.text == Some(" ".into()) || key_event.text.is_none() { Some("Space") } else { None From 92cdadcb1ac6b17bba0d99d0a5260bda4727ca7f Mon Sep 17 00:00:00 2001 From: Thom Dickson Date: Sun, 7 Jul 2024 12:38:18 -0400 Subject: [PATCH 23/33] Detach prompt (#2683) * feat: add exit handler the new exit handler covers both unsaved changes and detachinng from remote vim processes. * docs: add config docs for detach on quit --- src/bridge/exit_handler.lua | 30 ++++++++++++++++++++++++++++++ src/bridge/ui_commands.rs | 20 +++++++++++++------- website/docs/configuration.md | 20 ++++++++++++++++++++ 3 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 src/bridge/exit_handler.lua diff --git a/src/bridge/exit_handler.lua b/src/bridge/exit_handler.lua new file mode 100644 index 0000000000..86565d61d6 --- /dev/null +++ b/src/bridge/exit_handler.lua @@ -0,0 +1,30 @@ +local function quit(confirm) + if confirm then + vim.cmd("confirm qa") + else + vim.cmd("qa!") + end +end + +local function detach_handler(is_remote) + if is_remote then + local detach = vim.g.neovide_detach_on_quit or "prompt" + local c + if detach == "always_quit" then + c = 2 + elseif detach == "always_detach" then + c = 1 + else + c = vim.fn.confirm("Closing remote connection.", "&Detach\n&Quit\n&Cancel", 1) + end + + if c == 1 then + vim.fn.chanclose(vim.g.neovide_channel_id) + elseif c == 2 then + quit(vim.g.neovide_confirm_quit or false) + end + else + quit(vim.g.neovide_confirm_quit or false) + end +end +return detach_handler(...) diff --git a/src/bridge/ui_commands.rs b/src/bridge/ui_commands.rs index a09831c8a4..75e04f8fb9 100644 --- a/src/bridge/ui_commands.rs +++ b/src/bridge/ui_commands.rs @@ -7,9 +7,10 @@ use nvim_rs::{call_args, error::CallError, rpc::model::IntoVal, Neovim, Value}; use strum::AsRefStr; use tokio::sync::mpsc::unbounded_channel; -use super::show_error_message; +use super::{show_error_message, SETTINGS}; use crate::{ bridge::NeovimWriter, + cmd_line::CmdLineSettings, profiling::{tracy_dynamic_zone, tracy_fiber_enter, tracy_fiber_leave}, LoggingSender, }; @@ -178,14 +179,19 @@ impl ParallelCommand { // for failure is when neovim has already quit, and a command, for example mouse move is // being sent let result = match self { - ParallelCommand::Quit => nvim - .command( - "if get(g:, 'neovide_confirm_quit', 0) == 1 | confirm qa | else | qa! | endif", - ) - .await + ParallelCommand::Quit => { // Ignore all errors, since neovim exits immediately before the response is sent. // We could an RPC notify instead of request, but nvim-rs does currently not support it. - .or(Ok(())), + let _ = nvim + .exec_lua( + include_str!("exit_handler.lua"), + vec![Value::Boolean( + SETTINGS.get::().server.is_some(), + )], + ) + .await; + Ok(()) + } ParallelCommand::Resize { width, height } => nvim .ui_try_resize(width.max(10) as i64, height.max(3) as i64) .await diff --git a/website/docs/configuration.md b/website/docs/configuration.md index f281f25c4c..84d0804887 100644 --- a/website/docs/configuration.md +++ b/website/docs/configuration.md @@ -551,6 +551,26 @@ vim.g.neovide_confirm_quit = true If set to `true`, quitting while having unsaved changes will require confirmation. Enabled by default. +#### Detach On Quit + +Possible values are `always_quit`, `always_detach`, or `prompt`. Set to `prompt` by default. + +VimScript: + +```vim +let g:neovide_detach_on_quit = 'always_quit' +``` + +Lua: + +```lua +vim.g.neovide_detach_on_quit = 'always_quit' +``` + +This option changes the closing behavior of Neovide when it's used to connect to a remote Neovim +instance. It does this by switching between detaching from the remote instance and quitting Neovim +entirely. + #### Fullscreen VimScript: From 21efea46e1407abde0075243ee534caa89993494 Mon Sep 17 00:00:00 2001 From: xzbdmw <97848247+xzbdmw@users.noreply.github.com> Date: Mon, 8 Jul 2024 03:02:04 +0800 Subject: [PATCH 24/33] Fix wrong toml format and improve font fallback logic (#2639) * fix wrong toml format Update config-file.md Update config-file.md Update config-file.md * make sure fallback to normal don't use default * add more explaination Update config-file.md Update config-file.md Update config-file.md Update config-file.md respect normal font weigh in fallback if specified force variant weight in fallback if not found * add test * fix wrong partial font name in toml example --------- Co-authored-by: xzb --- src/renderer/fonts/font_options.rs | 28 +++-------- src/settings/font.rs | 80 ++++++++++++++++++++++++++++++ website/docs/config-file.md | 39 +++++++++++++-- 3 files changed, 121 insertions(+), 26 deletions(-) diff --git a/src/renderer/fonts/font_options.rs b/src/renderer/fonts/font_options.rs index 7cc83c5a74..782d777923 100644 --- a/src/renderer/fonts/font_options.rs +++ b/src/renderer/fonts/font_options.rs @@ -204,7 +204,12 @@ impl FontOptions { .map(|fonts| { fonts .iter() - .flat_map(|font| font.fallback(&self.normal)) + .filter(|font| font.family.is_some()) + .map(|font| FontDescription { + family: font.family.clone().unwrap(), + style: None, + }) + .chain(self.normal.iter().cloned()) .collect() }) .unwrap_or_else(|| self.normal.clone()); @@ -212,7 +217,7 @@ impl FontOptions { fonts .into_iter() .map(|font| FontDescription { - style: font.style.or_else(|| style.name().map(str::to_string)), + style: style.name().map(str::to_string), ..font }) .collect() @@ -385,25 +390,6 @@ impl FontDescription { } } -impl SecondaryFontDescription { - pub fn fallback(&self, primary: &[FontDescription]) -> Vec { - if let Some(family) = &self.family { - vec![FontDescription { - family: family.clone(), - style: self.style.clone(), - }] - } else { - primary - .iter() - .map(|font| FontDescription { - family: font.family.clone(), - style: self.style.clone(), - }) - .collect() - } - } -} - impl fmt::Display for FontDescription { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.family)?; diff --git a/src/settings/font.rs b/src/settings/font.rs index 4ebd58a060..219e8c91cc 100644 --- a/src/settings/font.rs +++ b/src/settings/font.rs @@ -135,6 +135,8 @@ impl From for FontOptions { #[cfg(test)] mod tests { + use crate::renderer::fonts::font_options::CoarseStyle; + use super::*; #[test] @@ -220,4 +222,82 @@ mod tests { _ => panic!("Unexpected value"), } } + + #[test] + fn test_secondary_font_not_found_fallback() { + let settings = r#" + { + "normal": ["Consolas", "Noto Emoji"], + "bold": "NotFound", + "size": 19 + } + "#; + + let settings: FontSettings = serde_json::from_str(settings).unwrap(); + let options = FontOptions::from(settings); + let style: CoarseStyle = CoarseStyle::permutations() + .filter(|style| style.name() == Some("Bold")) + .collect::>()[0]; + let fonts = options.font_list(style); + + assert_eq!(fonts.len(), 3); + assert_eq!( + fonts, + vec![ + FontDescription { + family: "NotFound".into(), + style: Some("Bold".into()) + }, + FontDescription { + family: "Consolas".into(), + style: Some("Bold".into()) + }, + FontDescription { + family: "Noto Emoji".into(), + style: Some("Bold".into()) + } + ] + ); + } + + #[test] + fn test_oneof_secondary_font_not_found_fallback() { + let settings = r#" + { + "normal": ["Consolas", "Noto Emoji"], + "bold": ["NotFound", "Menlo"], + "size": 19 + } + "#; + + let settings: FontSettings = serde_json::from_str(settings).unwrap(); + let options = FontOptions::from(settings); + let style: CoarseStyle = CoarseStyle::permutations() + .filter(|style| style.name() == Some("Bold")) + .collect::>()[0]; + let fonts = options.font_list(style); + + assert_eq!(fonts.len(), 4); + assert_eq!( + fonts, + vec![ + FontDescription { + family: "NotFound".into(), + style: Some("Bold".into()) + }, + FontDescription { + family: "Menlo".into(), + style: Some("Bold".into()) + }, + FontDescription { + family: "Consolas".into(), + style: Some("Bold".into()) + }, + FontDescription { + family: "Noto Emoji".into(), + style: Some("Bold".into()) + } + ] + ); + } } diff --git a/website/docs/config-file.md b/website/docs/config-file.md index 75ae60a297..a1aadc03d3 100644 --- a/website/docs/config-file.md +++ b/website/docs/config-file.md @@ -25,10 +25,6 @@ There are two types of settings: Settings currently available in the config file with default values: ```toml -[font] - normal = [] # Will use the bundled Fira Code Nerd Font by default - size = 14.0 - fork = false frame = "full" idle = true @@ -41,6 +37,10 @@ theme = "auto" title-hidden = true vsync = true wsl = false + +[font] +normal = [] # Will use the bundled Fira Code Nerd Font by default +size = 14.0 ``` Settings from environment variables can be found in [Command Line Reference](command-line-reference.md), @@ -96,5 +96,34 @@ normal = ["MonoLisa Nerd Font"] size = 18 [font.features] -MonoLisa = [ "+ss01", "+ss07", "+ss11", "-calt", "+ss09", "+ss02", "+ss14", "+ss16", "+ss17" ] +"MonoLisa Nerd Font" = [ "+ss01", "+ss07", "+ss11", "-calt", "+ss09", "+ss02", "+ss14" ] +``` + +Specify font weight: + +```toml +[font] +size = 19 +hinting = "full" +edging = "antialias" + +[[font.normal]] +family = "JetBrainsMono Nerd Font Propo" +style = "W400" + +# You can set a different font for fallback +[[font.normal]] +family = "Noto Sans CJK SC" +style = "Normal" + +[[font.bold]] +family = "JetBrainsMono Nerd Font Propo" +style = "W600" + +# No need to specify fallback in every variant, if omitted or specified here +# but not found, it will fallback to normal font with this weight which is bold +# in this case. +[[font.bold]] +family = "Noto Sans CJK SC" +style = "Bold" ``` From 3e787db299e96a647758f3b18e7bbbd235f164db Mon Sep 17 00:00:00 2001 From: thirstyice Date: Sun, 7 Jul 2024 13:51:51 -0600 Subject: [PATCH 25/33] Remove Snap store from installation.md (#2674) See #1149 --- website/docs/installation.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/website/docs/installation.md b/website/docs/installation.md index c1bfa24af3..8099b68fa9 100644 --- a/website/docs/installation.md +++ b/website/docs/installation.md @@ -140,16 +140,6 @@ Just add `neovide` from nixpkgs to your `environment.systemPackages` in `configu environment.systemPackages = with pkgs; [neovide]; ``` -### Snap - -Neovide is also available in the Snap Store. You can install it using the command below. - -```sh -snap install neovide -``` - -[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/neovide) - ### Linux Source 1. Install necessary dependencies (adjust for your preferred package manager, probably most of this From af5924e02a2ce6b6bc71dec5096939fa0865aa6c Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Mon, 8 Jul 2024 01:42:25 +0300 Subject: [PATCH 26/33] fix: Ensure windows settings are initialized when the window is created (#2619) * Ensure input_macos_option_key_is_meta is initialized after the window is created * Initialize fullscreen when the window is created * Clean up the fullscreen toggling code --- src/window/window_wrapper.rs | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/window/window_wrapper.rs b/src/window/window_wrapper.rs index 3def4d3e92..3b14b55d4d 100644 --- a/src/window/window_wrapper.rs +++ b/src/window/window_wrapper.rs @@ -68,7 +68,6 @@ pub struct WinitWindowWrapper { keyboard_manager: KeyboardManager, mouse_manager: MouseManager, title: String, - fullscreen: bool, font_changed_last_frame: bool, saved_inner_size: dpi::PhysicalSize, saved_grid_size: Option>, @@ -99,7 +98,6 @@ impl WinitWindowWrapper { keyboard_manager: KeyboardManager::new(), mouse_manager: MouseManager::new(), title: String::from("Neovide"), - fullscreen: false, font_changed_last_frame: false, saved_inner_size, saved_grid_size: None, @@ -122,18 +120,16 @@ impl WinitWindowWrapper { } } - pub fn toggle_fullscreen(&mut self) { + pub fn set_fullscreen(&mut self, fullscreen: bool) { if let Some(skia_renderer) = &self.skia_renderer { let window = skia_renderer.window(); - if self.fullscreen { - window.set_fullscreen(None); - } else { + if fullscreen { let handle = window.current_monitor(); window.set_fullscreen(Some(Fullscreen::Borderless(handle))); + } else { + window.set_fullscreen(None); } } - - self.fullscreen = !self.fullscreen; } #[cfg(target_os = "macos")] @@ -206,9 +202,7 @@ impl WinitWindowWrapper { self.requested_lines = lines.map(|v| v.try_into().unwrap()); } WindowSettingsChanged::Fullscreen(fullscreen) => { - if self.fullscreen != fullscreen { - self.toggle_fullscreen(); - } + self.set_fullscreen(fullscreen); } WindowSettingsChanged::InputIme(ime_enabled) => { self.set_ime(ime_enabled); @@ -483,6 +477,9 @@ impl WinitWindowWrapper { theme, transparency, window_blurred, + fullscreen, + #[cfg(target_os = "macos")] + input_macos_option_key_is_meta, .. } = SETTINGS.get::(); @@ -567,6 +564,10 @@ impl WinitWindowWrapper { ); window.set_blur(window_blurred && transparency < 1.0); + if fullscreen { + let handle = window.current_monitor(); + window.set_fullscreen(Some(Fullscreen::Borderless(handle))); + } match theme.as_str() { "light" => set_background("light"), @@ -592,6 +593,8 @@ impl WinitWindowWrapper { self.ui_state = UIState::FirstFrame; self.skia_renderer = Some(skia_renderer); + #[cfg(target_os = "macos")] + self.set_macos_option_as_meta(input_macos_option_key_is_meta); } fn handle_draw_commands(&mut self, batch: Vec) { From 3c48cab87ea9ad1bd851bbf5caede9ba80710b5a Mon Sep 17 00:00:00 2001 From: Alexsander Falcucci Date: Wed, 10 Jul 2024 15:00:27 +0200 Subject: [PATCH 27/33] fix: update the ui command to use tabs based on settings (#2692) - add a conditional check for tab behavior in ui command --- src/bridge/ui_commands.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bridge/ui_commands.rs b/src/bridge/ui_commands.rs index 75e04f8fb9..a2f4bce5b1 100644 --- a/src/bridge/ui_commands.rs +++ b/src/bridge/ui_commands.rs @@ -205,7 +205,13 @@ impl ParallelCommand { ParallelCommand::FileDrop(path) => nvim .cmd( vec![ - ("cmd".into(), "tabnew".into()), + ( + "cmd".into(), + (SETTINGS.get::().tabs) + .then(|| "tabnew".to_string()) + .unwrap_or("edit".into()) + .into(), + ), ("magic".into(), vec![("file".into(), false.into())].into()), ("args".into(), vec![Value::from(path)].into()), ], From cc8b36ff04a1db185eaafd28fdf7156c46343356 Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Wed, 10 Jul 2024 16:27:31 +0300 Subject: [PATCH 28/33] fix: A smal tweak to how the baseline offset and underline position is calculated (#2687) * Rename y_adjustment to baseline_offset * Distribute the font linegap equally on top and bottom * Calculate the underline offset relative to the baseline offset --- src/renderer/cursor_renderer/mod.rs | 4 ++-- src/renderer/fonts/caching_shaper.rs | 10 +++++++--- src/renderer/grid_renderer.rs | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/renderer/cursor_renderer/mod.rs b/src/renderer/cursor_renderer/mod.rs index 8f86d22d8b..3d581be69e 100644 --- a/src/renderer/cursor_renderer/mod.rs +++ b/src/renderer/cursor_renderer/mod.rs @@ -317,7 +317,7 @@ impl CursorRenderer { canvas.save(); canvas.clip_path(&path, None, Some(false)); - let y_adjustment = grid_renderer.shaper.y_adjustment(); + let baseline_offset = grid_renderer.shaper.baseline_offset(); let style = &self.cursor.grid_cell.1; let coarse_style = style.as_ref().map(|style| style.into()).unwrap_or_default(); @@ -326,7 +326,7 @@ impl CursorRenderer { for blob in blobs.iter() { canvas.draw_text_blob( blob, - (self.destination.x, self.destination.y + y_adjustment), + (self.destination.x, self.destination.y + baseline_offset), &paint, ); } diff --git a/src/renderer/fonts/caching_shaper.rs b/src/renderer/fonts/caching_shaper.rs index faa5b6ce7a..9a49378c1b 100644 --- a/src/renderer/fonts/caching_shaper.rs +++ b/src/renderer/fonts/caching_shaper.rs @@ -212,16 +212,20 @@ impl CachingShaper { pub fn underline_position(&mut self) -> f32 { let metrics = self.metrics(); - metrics.ascent - metrics.underline_offset + self.linespace / 2. + self.baseline_offset() - metrics.underline_offset } pub fn stroke_size(&mut self) -> f32 { self.metrics().stroke_size } - pub fn y_adjustment(&mut self) -> f32 { + pub fn baseline_offset(&mut self) -> f32 { let metrics = self.metrics(); - metrics.ascent + metrics.leading + self.linespace / 2. + // NOTE: leading is also called linegap and should be equally distributed on the top and + // bottom, so it's centered like our linespace settings. That's how it works on the web, + // but some desktop applications only use the top according to: + // https://googlefonts.github.io/gf-guide/metrics.html#8-linegap-values-must-be-0 + metrics.ascent + (metrics.leading + self.linespace) / 2.0 } fn build_clusters( diff --git a/src/renderer/grid_renderer.rs b/src/renderer/grid_renderer.rs index 353d85c862..12b6dd82b7 100644 --- a/src/renderer/grid_renderer.rs +++ b/src/renderer/grid_renderer.rs @@ -197,7 +197,7 @@ impl GridRenderer { let trimmed = trimmed.trim_end(); let adjustment = PixelVec::new( leading_spaces as f32 * self.grid_scale.0.width, - self.shaper.y_adjustment(), + self.shaper.baseline_offset(), ); if !trimmed.is_empty() { From 6bcabbadecacabbcf19f10c0d8d148004dc55fe5 Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Wed, 10 Jul 2024 16:28:11 +0300 Subject: [PATCH 29/33] Ensure that the mouse position is positive (#2690) --- src/window/mouse_manager.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/window/mouse_manager.rs b/src/window/mouse_manager.rs index 52b1f20d7d..c588d52ba0 100644 --- a/src/window/mouse_manager.rs +++ b/src/window/mouse_manager.rs @@ -63,7 +63,7 @@ struct TouchTrace { pub struct MouseManager { drag_details: Option, - grid_position: GridPos, + grid_position: GridPos, has_moved: bool, window_position: PixelPos, @@ -110,7 +110,7 @@ impl MouseManager { &self, window_details: &WindowDrawDetails, editor_state: &EditorState, - ) -> GridPos { + ) -> GridPos { let global_bounds = window_details.region; let clamped_position = clamp_position( self.window_position, @@ -121,6 +121,7 @@ impl MouseManager { (relative_position / *editor_state.grid_scale) .floor() + .max((0.0, 0.0).into()) .cast() } @@ -157,7 +158,7 @@ impl MouseManager { send_ui(SerialCommand::Drag { button: mouse_button_to_button_text(drag_details.button).unwrap(), grid_id: window_details.event_grid_id(), - position: self.grid_position.try_cast().unwrap().to_tuple(), + position: self.grid_position.to_tuple(), modifier_string: editor_state .keyboard_manager .format_modifier_string("", true), @@ -168,7 +169,7 @@ impl MouseManager { button: "move".into(), action: "".into(), // this is ignored by nvim grid_id: window_details.event_grid_id(), - position: relative_position.try_cast().unwrap().to_tuple(), + position: relative_position.to_tuple(), modifier_string: editor_state .keyboard_manager .format_modifier_string("", true), @@ -208,7 +209,7 @@ impl MouseManager { button: button_text.clone(), action, grid_id: details.event_grid_id(), - position: position.try_cast().unwrap().to_tuple(), + position: position.to_tuple(), modifier_string: editor_state .keyboard_manager .format_modifier_string("", true), @@ -255,7 +256,7 @@ impl MouseManager { let scroll_command = SerialCommand::Scroll { direction: input_type.to_string(), grid_id, - position: self.grid_position.try_cast().unwrap().to_tuple(), + position: self.grid_position.to_tuple(), modifier_string: editor_state .keyboard_manager .format_modifier_string("", true), @@ -275,7 +276,7 @@ impl MouseManager { let scroll_command = SerialCommand::Scroll { direction: input_type.to_string(), grid_id, - position: self.grid_position.try_cast().unwrap().to_tuple(), + position: self.grid_position.to_tuple(), modifier_string: editor_state .keyboard_manager .format_modifier_string("", true), From c7425dc49e1761563f02821edefb8980cc3ee0e2 Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Wed, 10 Jul 2024 18:11:46 +0300 Subject: [PATCH 30/33] fix: Fix the remote clipboard support (#2696) * Remove unneeded parameters from clipboard rpc calls * Reload the clipboard provider * Support the "*" register for the Neovide remote clipboard on Linux * Cleanup tuple deconstruction --- lua/init.lua | 12 +++++--- src/bridge/clipboard.rs | 16 ++++++++--- src/bridge/handler.rs | 4 +-- src/clipboard.rs | 56 ++++++++++++++++++++++++++++++++------ src/window/error_window.rs | 2 +- 5 files changed, 71 insertions(+), 19 deletions(-) diff --git a/lua/init.lua b/lua/init.lua index 8c854af830..ab9697c73d 100644 --- a/lua/init.lua +++ b/lua/init.lua @@ -27,15 +27,15 @@ local function rpcrequest(method, ...) end local function set_clipboard(register) - return function(lines, regtype) - rpcrequest("neovide.set_clipboard", lines) + return function(lines) + rpcrequest("neovide.set_clipboard", lines, register) end end local function get_clipboard(register) return function() return rpcrequest("neovide.get_clipboard", register) - end + end end if args.register_clipboard and not vim.g.neovide_no_custom_clipboard then @@ -49,10 +49,14 @@ if args.register_clipboard and not vim.g.neovide_no_custom_clipboard then ["+"] = get_clipboard("+"), ["*"] = get_clipboard("*"), }, - cache_enabled = 0 + cache_enabled = false } + vim.g.loaded_clipboard_provider = nil + vim.cmd.runtime("autoload/provider/clipboard.vim") end + + if args.register_right_click then vim.api.nvim_create_user_command("NeovideRegisterRightClick", function() rpcnotify("neovide.register_right_click") diff --git a/src/bridge/clipboard.rs b/src/bridge/clipboard.rs index 832e196234..efc5e3ad01 100644 --- a/src/bridge/clipboard.rs +++ b/src/bridge/clipboard.rs @@ -4,8 +4,12 @@ use rmpv::Value; use crate::clipboard; -pub fn get_clipboard_contents(format: Option<&str>) -> Result> { - let clipboard_raw = clipboard::get_contents()?.replace('\r', ""); +pub fn get_clipboard_contents( + format: Option<&str>, + register: &Value, +) -> Result> { + let register = register.as_str().unwrap_or("+"); + let clipboard_raw = clipboard::get_contents(register)?.replace('\r', ""); let is_line_paste = clipboard_raw.ends_with('\n'); let lines = if let Some("dos") = format { @@ -29,11 +33,15 @@ pub fn get_clipboard_contents(format: Option<&str>) -> Result Result> { +pub fn set_clipboard_contents( + value: &Value, + register: &Value, +) -> Result> { #[cfg(not(windows))] let endline = "\n"; #[cfg(windows)] let endline = "\r\n"; + let register = register.as_str().unwrap_or("+"); let lines = value .as_array() @@ -46,7 +54,7 @@ pub fn set_clipboard_contents(value: &Value) -> Result set_clipboard_contents(&arguments[0]) + "neovide.set_clipboard" => set_clipboard_contents(&arguments[0], &arguments[1]) .map_err(|_| Value::from("cannot set clipboard contents")), "neovide.quit" => { let error_code = arguments[0] diff --git a/src/clipboard.rs b/src/clipboard.rs index 1518e94e96..ce85b0cd1e 100644 --- a/src/clipboard.rs +++ b/src/clipboard.rs @@ -2,7 +2,10 @@ use std::error::Error; use std::sync::OnceLock; #[cfg(target_os = "linux")] -use copypasta::wayland_clipboard; +use copypasta::{ + wayland_clipboard, + x11_clipboard::{Primary as X11SelectionClipboard, X11ClipboardContext}, +}; use copypasta::{ClipboardContext, ClipboardProvider}; use parking_lot::Mutex; use raw_window_handle::HasRawDisplayHandle; @@ -14,24 +17,61 @@ use crate::window::UserEvent; type Result = std::result::Result>; -static CLIPBOARD: OnceLock>> = OnceLock::new(); +pub struct Clipboard { + clipboard: Box, + #[cfg(target_os = "linux")] + selection: Box, +} + +static CLIPBOARD: OnceLock> = OnceLock::new(); pub fn init(event_loop: &EventLoop) { CLIPBOARD .set(Mutex::new(match event_loop.raw_display_handle() { #[cfg(target_os = "linux")] RawDisplayHandle::Wayland(WaylandDisplayHandle { display, .. }) => unsafe { - Box::new(wayland_clipboard::create_clipboards_from_external(display).1) + let (selection, clipboard) = + wayland_clipboard::create_clipboards_from_external(display); + Clipboard { + clipboard: Box::new(clipboard), + selection: Box::new(selection), + } + }, + #[cfg(target_os = "linux")] + _ => Clipboard { + clipboard: Box::new(ClipboardContext::new().unwrap()), + selection: Box::new(X11ClipboardContext::::new().unwrap()), + }, + #[cfg(not(target_os = "linux"))] + _ => Clipboard { + clipboard: Box::new(ClipboardContext::new().unwrap()), }, - _ => Box::new(ClipboardContext::new().unwrap()), })) .ok(); } -pub fn get_contents() -> Result { - CLIPBOARD.get().unwrap().lock().get_contents() +pub fn get_contents(register: &str) -> Result { + match register { + #[cfg(target_os = "linux")] + "*" => CLIPBOARD.get().unwrap().lock().selection.get_contents(), + _ => CLIPBOARD.get().unwrap().lock().clipboard.get_contents(), + } } -pub fn set_contents(lines: String) -> Result<()> { - CLIPBOARD.get().unwrap().lock().set_contents(lines) +pub fn set_contents(lines: String, register: &str) -> Result<()> { + match register { + #[cfg(target_os = "linux")] + "*" => CLIPBOARD + .get() + .unwrap() + .lock() + .selection + .set_contents(lines), + _ => CLIPBOARD + .get() + .unwrap() + .lock() + .clipboard + .set_contents(lines), + } } diff --git a/src/window/error_window.rs b/src/window/error_window.rs index b9f1a81971..eb067656c0 100644 --- a/src/window/error_window.rs +++ b/src/window/error_window.rs @@ -248,7 +248,7 @@ impl State { true } "y" => { - let _ = clipboard::set_contents(message.to_string()); + let _ = clipboard::set_contents(message.to_string(), "+"); true } _ => false, From d3f9db06d8768073edb77988c0837d60cd96becc Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Wed, 10 Jul 2024 18:12:02 +0300 Subject: [PATCH 31/33] Unset ARGV0 to fix AppImage launch (#2691) --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index b74fdc897e..ffc02eb772 100644 --- a/src/main.rs +++ b/src/main.rs @@ -90,6 +90,10 @@ fn main() -> NeovideExitCode { windows_fix_dpi(); } + // This variable is set by the AppImage runtime and causes problems for child processes + #[cfg(target_os = "linux")] + env::remove_var("ARGV0"); + let event_loop = create_event_loop(); clipboard::init(&event_loop); From a4453b6e2e23e32f9b5a403a1e1edb27bca886ef Mon Sep 17 00:00:00 2001 From: Alexsander Falcucci Date: Fri, 12 Jul 2024 09:07:39 +0200 Subject: [PATCH 32/33] feat: update deployment scripts for macOS .dmg creation (#2700) * feat: update deployment scripts for macos `dmg` creation and architecture targeting - change the branches to `feat/dmg` instead of `main` - add `macos-14` to the list of operating systems - update the script to use `macos-14` as an available ubuntu release - update the script to install `create-dmg` for macos runners - remove the unnecessary `cargo bundle` commands - update the linux deployment script to use `target/release/neovide` instead of `neovide` - update the linux deployment script to use `assets/neovide.desktop` instead of `../../assets/neovide.desktop` - add steps to create `.dmg` files for different architectures on macos - update the `artifact` variable to include the architecture for macos-created artifacts - modify the script to use the architecture-specific paths for macos artifacts - update the `run` script to target a specific architecture based on input parameter * chore: standardize operating system choices across build matrix - remove `macos-14` from the list of operating systems in the build matrix - update the comments to clarify the reason for choosing ubuntu 20.04 for maximum compatibility * ci: update github workflow branch filter to main branch - update the branch filter from `branches: feat/dmg` to `branches: main` in the github workflow build configuration. * ci: update branch name in workflow file to `main` - update the branch name from `master` to `main` in the workflow file. * chore: consolidate artifact definitions for macos distributions - remove redundant artifact definition for x86_64-apple-darwin.dmg - add artifact definition for aarch64-apple-darwin.dmg * build: consolidate creation of platform-specific `.dmg` files - add creation of `.dmg` files for different platforms - remove creation of `.dmg` files for macos in the linux section * chore: reorganize file structure for linux deployment - move the `neovide` executable and used files in linux to a separate directory - update the linux deployment script to reflect new file locations * ci: optimize workflow for artifact uploads and macos build process - add a change to the workflow to only upload artifacts if env.artifact is set - move the cd $github_workspace command before creating the .dmg file for macos - remove the unneeded uses: actions/upload-artifact@v4 command --- .github/workflows/build.yml | 52 +++++++++++++++++++------------------ macos-builder/run | 4 +-- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74094531d5..3a6ae2d507 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,14 +9,14 @@ on: workflow_dispatch: # Always run on pull requests pull_request: - # And on master when manually pushed or after merges + # And on `main` when manually pushed or after merges paths-ignore: - "website/**" - ".vscode/**" - "**.md" push: branches: - main + - main paths-ignore: - "website/**" - ".vscode/**" @@ -144,9 +144,9 @@ jobs: if ! which cargo-wix; then cargo binstall -y cargo-wix; fi elif [[ $RUNNER_OS == "macOS" ]]; then + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" && brew install create-dmg rustup target add x86_64-apple-darwin rustup target add aarch64-apple-darwin - if ! which cargo-bundle; then cargo binstall -y cargo-bundle; fi elif [[ $RUNNER_OS == "Linux" ]]; then sudo apt-get update @@ -173,10 +173,8 @@ jobs: echo "MACOSX_DEPLOYMENT_TARGET=10.11" >> $GITHUB_ENV # x86 cargo build --locked --release --target=x86_64-apple-darwin - cargo bundle --release --target=x86_64-apple-darwin # arch cargo build --locked --release --target=aarch64-apple-darwin - cargo bundle --release --target=aarch64-apple-darwin elif [[ $RUNNER_OS == "Linux" ]]; then cargo build --locked --release @@ -184,31 +182,23 @@ jobs: - name: Prepare Artifacts run: | - cd target/release - if [[ $RUNNER_OS == "Windows" ]]; then echo "ARTIFACT=neovide.exe" >> $GITHUB_ENV echo "ARTIFACT2=neovide.msi" >> $GITHUB_ENV elif [[ $RUNNER_OS == "macOS" ]]; then - # merge builds - mkdir -p bundle/osx - rm -rf bundle/osx/neovide.app || true - cp -R ../x86_64-apple-darwin/release/bundle/osx/neovide.app \ - bundle/osx/neovide.app - rm bundle/osx/neovide.app/Contents/MacOS/neovide - lipo ../x86_64-apple-darwin/release/bundle/osx/neovide.app/Contents/MacOS/neovide \ - ../aarch64-apple-darwin/release/bundle/osx/neovide.app/Contents/MacOS/neovide \ - -create -output \ - bundle/osx/neovide.app/Contents/MacOS/neovide - codesign --force --deep -s - bundle/osx/neovide.app - # create .dmg - hdiutil create neovide-uncompressed.dmg -volname "neovide" -srcfolder bundle/osx - hdiutil convert neovide-uncompressed.dmg -format UDZO -o neovide.dmg - - echo "ARTIFACT=neovide.dmg" >> $GITHUB_ENV + cd $GITHUB_WORKSPACE + # create .dmg for x86_64-apple-darwin + ./macos-builder/run x86_64-apple-darwin + + # create .dmg for aarch64-apple-darwin + ./macos-builder/run aarch64-apple-darwin + + echo "ARTIFACT4=Neovide-x86_64-apple-darwin.dmg" >> $GITHUB_ENV + echo "ARTIFACT5=Neovide-aarch64-apple-darwin.dmg" >> $GITHUB_ENV elif [[ $RUNNER_OS == "Linux" ]]; then + cd target/release # archive artifact strip neovide tar czvf neovide-linux-x86_64.tar.gz neovide @@ -227,13 +217,13 @@ jobs: --icon-file=../../assets/neovide.svg \ --output=appimage - echo "ARTIFACT=neovide-linux-x86_64.tar.gz" >> $GITHUB_ENV echo "ARTIFACT2=neovide.AppImage" >> $GITHUB_ENV echo "ARTIFACT3=neovide.AppImage.zsync" >> $GITHUB_ENV fi - - uses: actions/upload-artifact@v4 + - if: env.ARTIFACT + uses: actions/upload-artifact@v4 with: name: ${{ env.ARTIFACT }} path: target/release/${{ env.ARTIFACT }} @@ -249,3 +239,15 @@ jobs: with: name: ${{ env.ARTIFACT3 }} path: target/release/${{ env.ARTIFACT3 }} + + - if: env.ARTIFACT4 + uses: actions/upload-artifact@v4 + with: + name: ${{ env.ARTIFACT4 }} + path: target/x86_64-apple-darwin/release/bundle/osx/${{ env.ARTIFACT4 }} + + - if: env.ARTIFACT5 + uses: actions/upload-artifact@v4 + with: + name: ${{ env.ARTIFACT5 }} + path: target/aarch64-apple-darwin/release/bundle/osx/${{ env.ARTIFACT5 }} diff --git a/macos-builder/run b/macos-builder/run index fa5155bafb..d13e6e4dad 100755 --- a/macos-builder/run +++ b/macos-builder/run @@ -5,7 +5,7 @@ set -e TARGET="neovide" EXTRAS_DIR="extra" ASSETS_DIR="assets" -RELEASE_DIR="target/release" +RELEASE_DIR="target/$1/release" BUNDLE_DIR="${RELEASE_DIR}/bundle" APP_NAME="Neovide.app" @@ -15,7 +15,7 @@ APP_BINARY="${RELEASE_DIR}/${TARGET}" APP_BINARY_DIR="${APP_DIR}/${APP_NAME}/Contents/MacOS" APP_EXTRAS_DIR="${APP_DIR}/${APP_NAME}/Contents/Resources" -DMG_NAME="Neovide.dmg" +DMG_NAME="Neovide-$1.dmg" DMG_VOLNAME="Neovide" DMG_FILESYSTEM="HFS+" DMG_FORMAT="UDZO" From f56145238570e9e3134a8d7d43144690661f62d0 Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Sat, 13 Jul 2024 11:34:53 +0300 Subject: [PATCH 33/33] Release 0.13.2 (#2697) * Update dependencies * Bump the version number --- Cargo.lock | 485 ++++++++++++++++++--------------- Cargo.toml | 12 +- src/renderer/opengl.rs | 2 +- src/renderer/rendered_layer.rs | 2 +- 4 files changed, 270 insertions(+), 231 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 520718cbe9..9b26a6e57b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.26" +version = "0.2.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e53b0a3d5760cd2ba9b787ae0c6440ad18ee294ff71b05e3381c900a7d16cfd" +checksum = "79faae4620f45232f599d9bc7b290f88247a0834162c4495ab2f02d60004adfb" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -68,7 +68,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" dependencies = [ "android-properties", - "bitflags 2.5.0", + "bitflags 2.6.0", "cc", "cesu8", "jni", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ "windows-sys 0.52.0", ] @@ -190,13 +190,13 @@ checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -213,9 +213,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -232,10 +232,10 @@ version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cexpr", "clang-sys", - "itertools", + "itertools 0.12.1", "lazy_static", "lazycell", "log", @@ -245,7 +245,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.66", + "syn 2.0.70", "which 4.4.2", ] @@ -257,9 +257,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block" @@ -294,22 +294,22 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.16.0" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" +checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "369cfaf2a5bed5d8f8202073b2e093c9f508251de1551a0deb4253e4c7d80909" +checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -340,7 +340,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "log", "polling", "rustix", @@ -362,9 +362,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.98" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" dependencies = [ "jobserver", "libc", @@ -416,14 +416,14 @@ dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -432,9 +432,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", @@ -442,9 +442,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", @@ -454,21 +454,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "clipboard-win" @@ -627,7 +627,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -674,9 +674,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "equivalent" @@ -746,9 +746,9 @@ dependencies = [ [[package]] name = "flexi_logger" -version = "0.28.0" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f248c29a6d4bc5d065c9e9068d858761a0dcd796759f7801cc14db35db23abd8" +checksum = "cca927478b3747ba47f98af6ba0ac0daea4f12d12f55e9104071b3dc00276310" dependencies = [ "chrono", "glob", @@ -758,9 +758,9 @@ dependencies = [ [[package]] name = "font-types" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf6aa1de86490d8e39e04589bd04eb5953cc2a5ef0c25e389e807f44fd24e41" +checksum = "34fd7136aca682873d859ef34494ab1a7d3f57ecd485ed40eb6437ee8c85aa29" dependencies = [ "bytemuck", ] @@ -783,7 +783,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -863,7 +863,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -932,9 +932,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gl" @@ -968,7 +968,7 @@ version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18fcd4ae4e86d991ad1300b8f57166e5be0c95ef1f63f3f5b827f8a164548746" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg_aliases", "cgl", "core-foundation", @@ -1037,12 +1037,6 @@ dependencies = [ "allocator-api2", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1055,6 +1049,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "home" version = "0.5.9" @@ -1170,6 +1170,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -1250,9 +1259,9 @@ checksum = "10257499f089cd156ad82d0a9cd57d9501fa2c989068992a97eb3c27836f206b" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lazycell" @@ -1268,12 +1277,12 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1282,7 +1291,7 @@ version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", "redox_syscall 0.4.1", ] @@ -1293,7 +1302,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", ] @@ -1315,9 +1324,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" @@ -1339,9 +1348,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -1360,9 +1369,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", "simd-adler32", @@ -1386,7 +1395,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "jni-sys", "log", "ndk-sys", @@ -1413,7 +1422,7 @@ dependencies = [ [[package]] name = "neovide" -version = "0.13.1" +version = "0.13.2" dependencies = [ "anyhow", "approx", @@ -1433,7 +1442,7 @@ dependencies = [ "icrate", "image", "indoc", - "itertools", + "itertools 0.13.0", "lazy_static", "log", "lru", @@ -1459,7 +1468,7 @@ dependencies = [ "time", "tokio", "tokio-util", - "toml 0.8.13", + "toml 0.8.14", "tracy-client-sys", "unicode-segmentation", "which 6.0.1", @@ -1496,7 +1505,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -1539,9 +1548,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -1608,7 +1617,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] @@ -1630,7 +1639,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -1703,9 +1712,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "memchr", ] @@ -1733,9 +1742,9 @@ dependencies = [ [[package]] name = "owned_ttf_parser" -version = "0.21.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b41438d2fc63c46c74a2203bf5ccd82c41ba04347b2fcf5754f230b167067d5" +checksum = "490d3a563d3122bf7c911a59b0add9389e5ec0f5f0c3ac6b91ff235a0e6a7f90" dependencies = [ "ttf-parser", ] @@ -1756,9 +1765,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1772,9 +1781,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall 0.5.2", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1819,7 +1828,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -1864,13 +1873,13 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.0" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi", + "hermit-abi 0.4.0", "pin-project-lite", "rustix", "tracing", @@ -1896,7 +1905,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -1910,18 +1919,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4" dependencies = [ "memchr", ] @@ -2020,9 +2029,9 @@ checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] name = "read-fonts" -version = "0.19.1" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4749db2bd1c853db31a7ae5ee2fc6c30bbddce353ea8fedf673fed187c68c7" +checksum = "e8b8af39d1f23869711ad4cea5e7835a20daa987f80232f7f2a2374d648ca64d" dependencies = [ "bytemuck", "font-types", @@ -2048,11 +2057,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -2068,9 +2077,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", @@ -2080,9 +2089,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -2091,9 +2100,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rmp" @@ -2134,7 +2143,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -2164,9 +2173,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ad2bbb0ae5100a07b7a6f2ed7ab5fd0045551a4c507989b7a620046ea3efdc" +checksum = "af947d0ca10a2f3e00c7ec1b515b7c83e5cb3fa62d4c11a64301d9eec54440e9" dependencies = [ "sdd", ] @@ -2191,9 +2200,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550" +checksum = "70b31447ca297092c5a9916fc3b955203157b37c19ca8edde4f52e9843e602c7" dependencies = [ "ab_glyph", "log", @@ -2210,29 +2219,29 @@ checksum = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d" [[package]] name = "serde" -version = "1.0.202" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -2270,7 +2279,7 @@ checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -2302,33 +2311,43 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "skia-bindings" -version = "0.73.0" +version = "0.75.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43555ec5d87ee8c14273f3045bf09504a58c6afe842c51d1593b62abf095aa96" +checksum = "c06e19e97660b09a381c6eb566849b63556b1a90b8e2c6ba2d146b3f5066847b" dependencies = [ "bindgen", "cc", "flate2", - "heck 0.5.0", + "heck", "lazy_static", "regex", "serde_json", "tar", - "toml 0.8.13", + "toml 0.8.14", ] [[package]] name = "skia-safe" -version = "0.73.0" +version = "0.75.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c431cc5c1ca6008199bf2e849083dd05539c9f2a2ffc1c24b521e6e0ef2c31a7" +checksum = "ad6e6f369522471b585c99427720b53aad04016fa4314e0a8cf23f17083a4e4c" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "lazy_static", "skia-bindings", "windows", ] +[[package]] +name = "skrifa" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab45fb68b53576a43d4fc0e9ec8ea64e29a4d2cc7f44506964cb75f288222e9" +dependencies = [ + "bytemuck", + "read-fonts", +] + [[package]] name = "slab" version = "0.4.9" @@ -2350,7 +2369,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "calloop", "calloop-wayland-source", "cursor-icon", @@ -2422,33 +2441,33 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] name = "swash" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "682a612b50baf09e8a039547ecf49e6c155690dcb751b1bcb19c93cdeb3d42d4" +checksum = "4d7773d67fe3373048cf840bfcc54ec3207cfc1e95c526b287ef2eb5eff9faf6" dependencies = [ - "read-fonts", + "skrifa", ] [[package]] @@ -2464,9 +2483,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" dependencies = [ "proc-macro2", "quote", @@ -2475,9 +2494,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -2501,7 +2520,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -2562,9 +2581,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.37.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes 1.6.0", @@ -2592,13 +2611,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -2626,14 +2645,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.13" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.13", + "toml_edit 0.22.15", ] [[package]] @@ -2658,15 +2677,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.13" +version = "0.22.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.8", + "winnow 0.6.13", ] [[package]] @@ -2696,9 +2715,9 @@ dependencies = [ [[package]] name = "ttf-parser" -version = "0.21.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" +checksum = "8686b91785aff82828ed725225925b33b4fde44c4bb15876e5f7c832724c420a" [[package]] name = "typed-path" @@ -2720,9 +2739,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "version_check" @@ -2773,7 +2792,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", "wasm-bindgen-shared", ] @@ -2807,7 +2826,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2820,9 +2839,9 @@ checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wayland-backend" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" +checksum = "269c04f203640d0da2092d1b8d89a2d081714ae3ac2f1b53e99f205740517198" dependencies = [ "cc", "downcast-rs", @@ -2834,11 +2853,11 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.2" +version = "0.31.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" +checksum = "08bd0f46c069d3382a36c8666c1b9ccef32b8b04f41667ca1fef06a1adcc2982" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "rustix", "wayland-backend", "wayland-scanner", @@ -2850,16 +2869,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cursor-icon", "wayland-backend", ] [[package]] name = "wayland-cursor" -version = "0.31.1" +version = "0.31.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba" +checksum = "09414bcf0fd8d9577d73e9ac4659ebc45bcc9cff1980a350543ad8e50ee263b2" dependencies = [ "rustix", "wayland-client", @@ -2872,7 +2891,7 @@ version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -2884,7 +2903,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -2897,7 +2916,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -2906,9 +2925,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.1" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" +checksum = "edf466fc49a4feb65a511ca403fec3601494d0dee85dbf37fff6fa0dd4eec3b6" dependencies = [ "proc-macro2", "quick-xml", @@ -2917,9 +2936,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.1" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +checksum = "4a6754825230fa5b27bafaa28c30b3c9e72c55530581220cef401fa422c0fae7" dependencies = [ "dlib", "log", @@ -3009,7 +3028,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" dependencies = [ "windows-core 0.56.0", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3018,7 +3037,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3029,8 +3048,8 @@ checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" dependencies = [ "windows-implement", "windows-interface", - "windows-result", - "windows-targets 0.52.5", + "windows-result 0.1.2", + "windows-targets 0.52.6", ] [[package]] @@ -3041,7 +3060,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -3052,26 +3071,46 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] name = "windows-registry" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f721bc2e55efb506a1a395a545cb76c2481fb023d33b51f0050e7888716281cf" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-result", - "windows-targets 0.52.5", + "windows-result 0.2.0", + "windows-strings", + "windows-targets 0.52.6", ] [[package]] name = "windows-result" -version = "0.1.1" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", ] [[package]] @@ -3098,7 +3137,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3133,18 +3172,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3161,9 +3200,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3179,9 +3218,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3197,15 +3236,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3221,9 +3260,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3239,9 +3278,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3257,9 +3296,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3275,9 +3314,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" @@ -3288,7 +3327,7 @@ dependencies = [ "ahash", "android-activity", "atomic-waker", - "bitflags 2.5.0", + "bitflags 2.6.0", "bytemuck", "calloop", "cfg_aliases", @@ -3340,9 +3379,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.8" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] @@ -3442,7 +3481,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "dlib", "log", "once_cell", @@ -3451,9 +3490,9 @@ dependencies = [ [[package]] name = "xkeysym" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" [[package]] name = "xml-rs" @@ -3463,20 +3502,20 @@ checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] diff --git a/Cargo.toml b/Cargo.toml index 7d1c84bdb9..8374d2406e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "neovide" -version = "0.13.1" +version = "0.13.2" edition = "2021" build = "build.rs" resolver = "2" @@ -44,7 +44,7 @@ glutin = "0.31.1" glutin-winit = "0.4.2" image = { version = "0.25.0", default-features = false, features = ["ico"] } indoc = "2.0.5" -itertools = "0.12.1" +itertools = "0.13.0" lazy_static = "1.4.0" log = "0.4.16" lru = "0.12.2" @@ -86,7 +86,7 @@ serial_test = "3.0.0" [target.'cfg(target_os = "windows")'.dependencies] wslpath-rs = "0.1" -skia-safe = { version = "0.73.0", features = ["gl", "d3d", "textlayout"] } +skia-safe = { version = "0.75.0", features = ["gl", "d3d", "textlayout"] } windows = { version = "0.56.0", features = [ "Win32_Graphics_Direct3D", "Win32_Graphics_Direct3D12", @@ -100,10 +100,10 @@ windows = { version = "0.56.0", features = [ "Win32_System_Threading", "Win32_UI_HiDpi", ] } -windows-registry = "0.1.1" +windows-registry = "0.2.0" [target.'cfg(not(target_os = "windows"))'.dependencies] -skia-safe = { version = "0.73.0", features = ["gl", "textlayout"] } +skia-safe = { version = "0.75.0", features = ["gl", "textlayout"] } [target.'cfg(target_os = "macos")'.dependencies] icrate = { version = "0.0.4", features = [ @@ -141,7 +141,7 @@ debug = true name = "Neovide" identifier = "com.neovide.neovide" icon = ["assets/neovide.ico"] -version = "0.13.1" +version = "0.13.2" resources = [] copyright = "Copyright (c) Neovide Contributors 2024. All rights reserved." category = "Productivity" diff --git a/src/renderer/opengl.rs b/src/renderer/opengl.rs index 9088d25b9b..4ca4e3e15e 100644 --- a/src/renderer/opengl.rs +++ b/src/renderer/opengl.rs @@ -121,7 +121,7 @@ impl OpenGLSkiaRenderer { }) .expect("Could not create interface"); - let mut gr_context = skia_safe::gpu::DirectContext::new_gl(interface, None) + let mut gr_context = skia_safe::gpu::direct_contexts::make_gl(interface, None) .expect("Could not create direct context"); let fb_info = { let mut fboid: GLint = 0; diff --git a/src/renderer/rendered_layer.rs b/src/renderer/rendered_layer.rs index 0227c8002e..cd3c2206e1 100644 --- a/src/renderer/rendered_layer.rs +++ b/src/renderer/rendered_layer.rs @@ -184,7 +184,7 @@ pub fn group_windows( windows.sort_by(|a, b| a.group.cmp(&b.group)); windows .into_iter() - .group_by(|window| window.group) + .chunk_by(|window| window.group) .into_iter() .map(|(_, v)| v.map(|w| w.window).collect::>()) .collect_vec()