We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a6e85f commit a56de9eCopy full SHA for a56de9e
src/common/diffHunk.ts
@@ -239,7 +239,10 @@ export function splitIntoSmallerHunks(hunk: DiffHunk): DiffHunk[] {
239
}
240
addLineToHunk(nextHunk, line);
241
242
- } else if (currentHunk) {
+ } else if (currentHunk || ((hunk.oldLineNumber === 1) && ((line.type === DiffChangeType.Delete) || (line.type === DiffChangeType.Add)))) {
243
+ if (!currentHunk) {
244
+ currentHunk = newHunk(line);
245
+ }
246
if (hunkHasSandwichedChanges(currentHunk)) {
247
splitHunks.push(currentHunk);
248
currentHunk = nextHunk!;
0 commit comments