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.

Don't disable auto-indent when typing in multi buffers (#18984)

Max Brunsfeld5cf4ac16d6da
diff --git a/crates/multi_buffer/src/multi_buffer.rs b/crates/multi_buffer/src/multi_buffer.rs
index 18af28498fb..a239b5b7704 100644
--- a/crates/multi_buffer/src/multi_buffer.rs
+++ b/crates/multi_buffer/src/multi_buffer.rs
@@ -724,7 +724,7 @@ impl MultiBuffer {
original_indent_columns: Default::default(),
})
} else {
- None
+ autoindent_mode.clone()
};
let insertion_autoindent_mode =
if let Some(AutoindentMode::Block { .. }) = autoindent_mode {
@@ -732,7 +732,7 @@ impl MultiBuffer {
original_indent_columns,
})
} else {
- None
+ autoindent_mode.clone()
};
buffer.edit(deletions, deletion_autoindent_mode, cx);