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:
co-authored by
Antonio
Bennet
parent
e0f4c01794
commit
4300ef840b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user