优化消息里编辑工具代码行号diff计算
This commit is contained in:
@@ -564,7 +564,7 @@ fn find_hunk_position(
|
|||||||
.map(|l| &l[1..])
|
.map(|l| &l[1..])
|
||||||
.collect();
|
.collect();
|
||||||
if let Some(pos) = find_contiguous(file_lines, &new_view) {
|
if let Some(pos) = find_contiguous(file_lines, &new_view) {
|
||||||
return Some((pos + 1, new_count, new_count));
|
return Some((pos + 1, old_count, new_count));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Strategy 2: contiguous match of context+deleted (pre-patch)
|
// Strategy 2: contiguous match of context+deleted (pre-patch)
|
||||||
|
|||||||
Reference in New Issue
Block a user