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:
co-authored by
Mikayla Maki
parent
cdf6ae25bb
commit
fa5af4383d
@@ -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)
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user