Record start columns when writing to the clipboard from Zed

This commit is contained in:
Max Brunsfeld 2022-07-28 18:09:24 -07:00
parent 2d05f906f1
commit 7a26fa18c7
5 changed files with 214 additions and 45 deletions

View file

@ -944,7 +944,9 @@ fn test_autoindent_block_mode(cx: &mut MutableAppContext) {
// so that the first line matches the previous line's indentation.
buffer.edit(
[(Point::new(2, 0)..Point::new(2, 0), inserted_text.clone())],
Some(AutoindentMode::Block),
Some(AutoindentMode::Block {
start_columns: vec![0],
}),
cx,
);
assert_eq!(
@ -967,7 +969,9 @@ fn test_autoindent_block_mode(cx: &mut MutableAppContext) {
buffer.edit([(Point::new(2, 0)..Point::new(2, 0), " ")], None, cx);
buffer.edit(
[(Point::new(2, 8)..Point::new(2, 8), inserted_text.clone())],
Some(AutoindentMode::Block),
Some(AutoindentMode::Block {
start_columns: vec![0],
}),
cx,
);
assert_eq!(