From 05111ef8cb10c5e8bb556a353ec79aea1880abdc Mon Sep 17 00:00:00 2001 From: Alexsander Falcucci Date: Fri, 6 Feb 2026 22:25:12 +0100 Subject: [PATCH] feat: introduce macos matching pair highlight with find indicator (#3346) --- Cargo.lock | 1 + Cargo.toml | 3 + src/bridge/events.rs | 88 +++++- src/bridge/mod.rs | 2 + src/editor/mod.rs | 541 +++++++++++++++++++++++++++++++- src/platform/macos/mod.rs | 138 +++++++- src/renderer/mod.rs | 2 +- src/renderer/rendered_window.rs | 6 +- src/window/mod.rs | 7 + src/window/settings.rs | 4 + src/window/window_wrapper.rs | 34 +- website/docs/configuration.md | 19 ++ 12 files changed, 836 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f9016fcb..a964698f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2129,6 +2129,7 @@ dependencies = [ "bitflags 2.10.0", "objc2 0.6.3", "objc2-core-foundation", + "objc2-core-graphics", "objc2-foundation 0.3.2", "objc2-metal 0.3.2", ] diff --git a/Cargo.toml b/Cargo.toml index 88ca02b5..e2cd9a27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -158,7 +158,9 @@ objc2-app-kit = { version = "0.3.1", default-features = false, features = [ objc2-quartz-core = { version = "0.3.1", default-features = false, features = [ "std", "objc2-core-foundation", + "objc2-core-graphics", "objc2-metal", + "CATransaction", "CALayer", "CAMetalLayer", ] } @@ -169,6 +171,7 @@ objc2-core-video = { version = "0.3.1", default-features = false, features = [ "CVDisplayLink", ] } objc2-core-graphics = { version = "0.3.1", default-features = false, features = [ + "CGColor", "CGDirectDisplay", ] } objc2-metal = { version = "0.3.1", default-features = false, features = [ diff --git a/src/bridge/events.rs b/src/bridge/events.rs index 740625e8..a94576d7 100644 --- a/src/bridge/events.rs +++ b/src/bridge/events.rs @@ -229,6 +229,11 @@ pub enum RedrawEvent { HighlightAttributesDefine { id: u64, style: Style, + name: Option, + }, + HighlightGroupSet { + name: String, + id: u64, }, /// Redraw a continuous part of a `row` on a `grid`. /// @@ -242,6 +247,14 @@ pub enum RedrawEvent { column_start: u64, cells: Vec, }, + /// Highlight a range of cells without redrawing text. + GridHighlight { + grid: u64, + row: u64, + column_start: u64, + column_end: u64, + highlight_id: u64, + }, /// Clear a `grid`. Clear { grid: u64, @@ -683,13 +696,57 @@ fn parse_style(style_map: Value, _info_array: Value) -> Result