Do not show diffs for files with \r\n contents (#11519)

This commit is contained in:
Kirill Bulatov
2024-05-08 00:37:09 +03:00
committed by GitHub
parent 6a64b732b6
commit 3d9f0087ff
6 changed files with 56 additions and 33 deletions
@@ -21,7 +21,6 @@ use std::{
Arc,
},
};
use text::Rope;
use ui::Context;
use util::{
assert_set_eq,
@@ -272,8 +271,7 @@ impl EditorTestContext {
}
pub fn set_diff_base(&mut self, diff_base: Option<&str>) {
let diff_base = diff_base.map(Rope::from);
self.update_buffer(|buffer, cx| buffer.set_diff_base(diff_base, cx));
self.update_buffer(|buffer, cx| buffer.set_diff_base(diff_base.map(ToOwned::to_owned), cx));
}
/// Change the editor's text and selections using a string containing