Introduce AutoindentMode parameter to Buffer::edit

This controls whether or not we preserve the relative indentation
of inserted text blocks.

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
This commit is contained in:
Max Brunsfeld
2022-07-28 14:03:31 -07:00
co-authored by Mikayla Maki
parent cdf6ae25bb
commit fa5af4383d
18 changed files with 308 additions and 236 deletions
+1 -1
View File
@@ -1164,7 +1164,7 @@ mod tests {
// Insert a line break, separating two block decorations into separate lines.
let buffer_snapshot = buffer.update(cx, |buffer, cx| {
buffer.edit([(Point::new(1, 1)..Point::new(1, 1), "!!!\n")], cx);
buffer.edit([(Point::new(1, 1)..Point::new(1, 1), "!!!\n")], None, cx);
buffer.snapshot(cx)
});