helix/helix-view/src/events.rs

17 lines
444 B
Rust
Raw Normal View History

use helix_core::{ChangeSet, Rope};
2023-12-01 07:03:26 +08:00
use helix_event::events;
use crate::{Document, DocumentId, Editor, ViewId};
2023-12-01 07:03:26 +08:00
events! {
DocumentDidChange<'a> {
doc: &'a mut Document,
view: ViewId,
old_text: &'a Rope,
changes: &'a ChangeSet,
ghost_transaction: bool
}
2023-12-01 07:03:26 +08:00
SelectionDidChange<'a> { doc: &'a mut Document, view: ViewId }
DiagnosticsDidChange<'a> { editor: &'a mut Editor, doc: DocumentId }
2023-12-01 07:03:26 +08:00
}