aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/events.rs
diff options
context:
space:
mode:
authorPascal Kuthe2023-11-30 23:03:26 +0000
committerBlaž Hrastnik2024-01-23 02:20:19 +0000
commit13ed4f6c4748019787d24c2b686d417b71604242 (patch)
tree8263b77ee05a22dfc85410345069efb3668b1877 /helix-view/src/events.rs
parent7d7ace551cd58f0b6d65af7a6dfa8f896d94724a (diff)
Add hook/event system
Diffstat (limited to 'helix-view/src/events.rs')
-rw-r--r--helix-view/src/events.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/helix-view/src/events.rs b/helix-view/src/events.rs
new file mode 100644
index 00000000..8b789cc0
--- /dev/null
+++ b/helix-view/src/events.rs
@@ -0,0 +1,9 @@
+use helix_core::Rope;
+use helix_event::events;
+
+use crate::{Document, ViewId};
+
+events! {
+ DocumentDidChange<'a> { doc: &'a mut Document, view: ViewId, old_text: &'a Rope }
+ SelectionDidChange<'a> { doc: &'a mut Document, view: ViewId }
+}