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.

Clear auto-indent requests when replacing a buffer's entire text

Max Brunsfeld361b7c3a0c75
diff --git a/crates/language/src/buffer.rs b/crates/language/src/buffer.rs
index 09a96342271..de1fc009ad3 100644
--- a/crates/language/src/buffer.rs
+++ b/crates/language/src/buffer.rs
@@ -1366,6 +1366,7 @@ impl Buffer {
where
T: Into<Arc<str>>,
{
+ self.autoindent_requests.clear();
self.edit([(0..self.len(), text)], None, cx)
}