Commit 7c04e408 authored by Phil Hughes's avatar Phil Hughes

changed endLineNumber calculation

[ci skip]
parent caa2f10e
...@@ -14,13 +14,13 @@ export default class DirtyDiffWorker { ...@@ -14,13 +14,13 @@ export default class DirtyDiffWorker {
if (findOnLine) { if (findOnLine) {
Object.assign(findOnLine, change, { Object.assign(findOnLine, change, {
modified: true, modified: true,
endLineNumber: change.count > 1 ? lineNumber + change.count : lineNumber, endLineNumber: (lineNumber + change.count) - 1,
}); });
} else if ('added' in change || 'removed' in change) { } else if ('added' in change || 'removed' in change) {
acc.push(Object.assign({}, change, { acc.push(Object.assign({}, change, {
lineNumber, lineNumber,
modified: undefined, modified: undefined,
endLineNumber: change.count > 1 ? lineNumber + change.count : lineNumber, endLineNumber: (lineNumber + change.count) - 1,
})); }));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment