From 361b7c3a0c75efa49ad59f6d366b60188600a9bd Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 22 Mar 2023 15:10:16 -0700 Subject: [PATCH] Clear auto-indent requests when replacing a buffer's entire text --- crates/language/src/buffer.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/language/src/buffer.rs b/crates/language/src/buffer.rs index 09a9634227..de1fc009ad 100644 --- a/crates/language/src/buffer.rs +++ b/crates/language/src/buffer.rs @@ -1366,6 +1366,7 @@ impl Buffer { where T: Into>, { + self.autoindent_requests.clear(); self.edit([(0..self.len(), text)], None, cx) }