zeta: Use word-wise diff when computing edits (#21810)

Release Notes:

- N/A

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
Thorsten Ball
2024-12-10 16:05:34 +01:00
committed by GitHub
co-authored by Antonio Bennet
parent e0f4c01794
commit 4300ef840b
+1 -1
View File
@@ -409,7 +409,7 @@ impl Zeta {
offset: usize,
snapshot: &BufferSnapshot,
) -> Vec<(Range<Anchor>, String)> {
let diff = similar::TextDiff::from_chars(old_text.as_str(), new_text);
let diff = similar::TextDiff::from_words(old_text.as_str(), new_text);
let mut edits: Vec<(Range<usize>, String)> = Vec::new();
let mut old_start = offset;