Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Count chars

Joseph Lyons7f3d9379380e
diff --git a/crates/feedback/src/feedback_editor.rs b/crates/feedback/src/feedback_editor.rs
index a3318d3efe5..5398a8900ec 100644
--- a/crates/feedback/src/feedback_editor.rs
+++ b/crates/feedback/src/feedback_editor.rs
@@ -134,7 +134,7 @@ impl FeedbackEditor {
_: ModelHandle<Project>,
cx: &mut ViewContext<Self>,
) -> Task<anyhow::Result<()>> {
- let feedback_char_count = self.editor.read(cx).buffer().read(cx).len(cx);
+ let feedback_char_count = self.editor.read(cx).text(cx).chars().count();
let error = if feedback_char_count < *FEEDBACK_CHAR_LIMIT.start() {
Some(format!(