diff --git a/helix-view/src/extension.rs b/helix-view/src/extension.rs index e2d77b956..0c9855cc9 100644 --- a/helix-view/src/extension.rs +++ b/helix-view/src/extension.rs @@ -27,7 +27,15 @@ mod steel_implementations { impl steel::gc::unsafe_erased_pointers::CustomReference for Editor {} steel::custom_reference!(Editor); - impl steel::rvals::Custom for Mode {} + impl steel::rvals::Custom for Mode { + fn equality_hint(&self, other: &dyn steel::rvals::CustomType) -> bool { + if let Some(other) = as_underlying_type::(other) { + self == other + } else { + false + } + } + } impl steel::rvals::Custom for Event {} impl Custom for Style { fn fmt(&self) -> Option> { @@ -51,8 +59,24 @@ mod steel_implementations { } } } - impl Custom for crate::graphics::CursorKind {} - impl Custom for DocumentId {} + impl Custom for crate::graphics::CursorKind { + fn equality_hint(&self, other: &dyn steel::rvals::CustomType) -> bool { + if let Some(other) = as_underlying_type::(other) { + self == other + } else { + false + } + } + } + impl Custom for DocumentId { + fn equality_hint(&self, other: &dyn steel::rvals::CustomType) -> bool { + if let Some(other) = as_underlying_type::(other) { + self == other + } else { + false + } + } + } impl Custom for ViewId { fn equality_hint(&self, other: &dyn steel::rvals::CustomType) -> bool { if let Some(other) = as_underlying_type::(other) {