提交 b127d658 编写于 作者: R Rachel Macfarlane

Fix mapOldPositionToNew

上级 bd647b78
......@@ -181,9 +181,9 @@ export function mapOldPositionToNew(patch: string, line: number): number {
let diffHunk = diffIter.value;
if (diffHunk.oldLineNumber > line) {
continue;
// No-op
} else if (diffHunk.oldLineNumber + diffHunk.oldLength - 1 < line) {
delta = diffHunk.newLength - diffHunk.oldLength;
delta += diffHunk.newLength - diffHunk.oldLength;
} else {
return line + delta;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册