From 72146cc5ed6253d548a546f972784ced5a34d31d Mon Sep 17 00:00:00 2001
From: sam edelsten <43527203+bytemunch@users.noreply.github.com>
Date: Thu, 30 May 2024 18:00:25 +0100
Subject: [PATCH] fire text change events from editor contents instead of
 underlying buffer (#142)

---
 src/input.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/input.rs b/src/input.rs
index 7c4240f..652ad15 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -503,7 +503,10 @@ pub(crate) fn kb_input_text(
             return;
         }
 
-        evw_changed.send(CosmicTextChanged((entity, buffer.get_text())));
+        evw_changed.send(CosmicTextChanged((
+            entity,
+            editor.with_buffer_mut(|b| b.get_text()),
+        )));
     }
 }
 
-- 
GitLab