From 82dce7a650d82b95dcfe308a5ffe2ec5c844486d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kwarci=C5=84ski?= <100768054+piotrkwarcinski@users.noreply.github.com> Date: Thu, 5 Jun 2025 21:46:48 +0200 Subject: [PATCH] ViewID equality (#30) --- helix-view/src/extension.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/helix-view/src/extension.rs b/helix-view/src/extension.rs index 32cba948b..e2d77b956 100644 --- a/helix-view/src/extension.rs +++ b/helix-view/src/extension.rs @@ -53,7 +53,15 @@ mod steel_implementations { } impl Custom for crate::graphics::CursorKind {} impl Custom for DocumentId {} - impl Custom for ViewId {} + impl Custom for ViewId { + fn equality_hint(&self, other: &dyn steel::rvals::CustomType) -> bool { + if let Some(other) = as_underlying_type::(other) { + self == other + } else { + false + } + } + } impl CustomReference for Document {} impl Custom for Action {}