-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve findAlignedLines
#706
Conversation
bot please update playwright snapshots |
Playwright windows-latest snapshots updated. |
@fcollonval thanks for this PR. I have tried it on a case that was not producing correct results (the case reported in issue #669 that is close to the one present in this PR) and it seems to work. |
a960ea3
to
52c406e
Compare
? this._base.cm.defaultLineHeight | ||
: this._diffViews[0].remoteEditorWidget.cm.defaultLineHeight; | ||
if (this._aligning) { | ||
return; | ||
} | ||
this._aligning = true; | ||
// Find matching lines | ||
let linesToAlign = findAlignedLines(this._diffViews); | ||
const linesToAlign = findAlignedLines(this._diffViews); | ||
console.log(linesToAlign) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug log statement left behind
break; | ||
} | ||
} | ||
return toMatch.baseTo; | ||
// toMatch is not in chunks list, add lines delta from the last chunk | ||
console.log(previous, toMatch.baseTo + (previous ? (previous.remoteTo - previous.baseTo) : 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug log statement left behind
@@ -1179,17 +1179,26 @@ function getMatchingEditLine(baseLine: number, chunks: Chunk[]): number { | |||
* | |||
*/ | |||
function getMatchingEditLineLC(toMatch: Chunk, chunks: Chunk[]): number { | |||
let editLine = toMatch.baseFrom; | |||
console.log(toMatch, chunks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log statement
Review comment from jupyter#706
Fixes #669
Compute correctly the alignment for a chunk in another diff view.
Before
After