mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
debugging
This commit is contained in:
parent
80a87ff3c6
commit
84bfc26dce
1 changed files with 6 additions and 0 deletions
|
|
@ -451,6 +451,8 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService {
|
|||
// changes the start/line locations of all DiffAreas on the page (adjust their start/end based on the change) based on the change that was recently made
|
||||
private _realignAllDiffAreasLines(uri: URI, text: string, recentChange: { startLineNumber: number; endLineNumber: number }) {
|
||||
|
||||
console.log('recent change', recentChange)
|
||||
|
||||
const model = this._getModel(uri)
|
||||
if (!model) return
|
||||
|
||||
|
|
@ -525,6 +527,7 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService {
|
|||
for (let diffareaid of this.diffAreasOfURI[uri.fsPath]) {
|
||||
const diffArea = this.diffAreaOfId[diffareaid]
|
||||
|
||||
console.log('DA start and end:', diffArea.startLine, diffArea.endLine)
|
||||
const newDiffAreaCode = fullFileText.split('\n').slice((diffArea.startLine - 1), (diffArea.endLine - 1) + 1).join('\n')
|
||||
const computedDiffs = findDiffs(diffArea.originalCode, newDiffAreaCode)
|
||||
|
||||
|
|
@ -900,9 +903,12 @@ Please finish writing the new file by applying the diff to the original file. Re
|
|||
throw new Error(`Void error: ${diff}.type not recognized`)
|
||||
}
|
||||
|
||||
console.log('REJECTION start, end:', diffArea.startLine, diffArea.endLine)
|
||||
// update the file
|
||||
this._writeText(uri, writeText, toRange)
|
||||
|
||||
console.log('2REJECTION start, end:', diffArea.startLine, diffArea.endLine)
|
||||
|
||||
// originalCode does not change!
|
||||
|
||||
// delete the diff
|
||||
|
|
|
|||
Loading…
Reference in a new issue