You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix/helix-view/src/extension.rs

15 lines
507 B
Rust

2 years ago
use steel::{gc::unsafe_erased_pointers::CustomReference, rvals::Custom};
1 year ago
use crate::{graphics::Rect, input::Event, Document, DocumentId, ViewId};
2 years ago
1 year ago
// Reference types along with value types - This should allow for having users
2 years ago
impl CustomReference for Event {}
impl Custom for Rect {}
impl Custom for crate::graphics::CursorKind {}
1 year ago
impl Custom for DocumentId {}
impl Custom for ViewId {}
impl CustomReference for Document {}
pub fn document_id_to_usize(doc_id: &DocumentId) -> usize {
doc_id.0.into()
}