Skip to content

Commit cd55adf

Browse files
committed
1 parent 7812e81 commit cd55adf

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

src/vs/editor/common/diff/diffComputer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ class LineChange implements ILineChange {
284284
const originalCharSequence = originalLineSequence.getCharSequence(diffChange.originalStart, diffChange.originalStart + diffChange.originalLength - 1);
285285
const modifiedCharSequence = modifiedLineSequence.getCharSequence(diffChange.modifiedStart, diffChange.modifiedStart + diffChange.modifiedLength - 1);
286286

287-
let rawChanges = computeDiff(originalCharSequence, modifiedCharSequence, continueProcessingPredicate, false);
287+
let rawChanges = computeDiff(originalCharSequence, modifiedCharSequence, continueProcessingPredicate, true);
288288

289289
if (shouldPostProcessCharChanges) {
290290
rawChanges = postProcessCharChanges(rawChanges);

src/vs/editor/test/common/diff/diffComputer.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,4 +673,23 @@ suite('Editor Diff - DiffComputer', () => {
673673
];
674674
assertDiff(original, modified, expected, true, false);
675675
});
676+
677+
test('issue #43922', () => {
678+
let original = [
679+
' * `yarn [install]` -- Install project NPM dependencies. This is automatically done when you first create the project. You should only need to run this if you add dependencies in `package.json`.',
680+
];
681+
let modified = [
682+
' * `yarn` -- Install project NPM dependencies. You should only need to run this if you add dependencies in `package.json`.',
683+
];
684+
var expected = [
685+
createLineChange(
686+
1, 1, 1, 1,
687+
[
688+
createCharChange(1, 9, 1, 19, 0, 0, 0, 0),
689+
createCharChange(1, 58, 1, 120, 0, 0, 0, 0),
690+
]
691+
)
692+
];
693+
assertDiff(original, modified, expected, true, false);
694+
});
676695
});

0 commit comments

Comments
 (0)