mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Only calc diff to scroll to if fileExists
This commit is contained in:
@@ -848,6 +848,7 @@ export class ClaudeDev {
|
||||
await vscode.workspace.applyEdit(edit) // has the added benefit of maintaing the file's original EOLs
|
||||
|
||||
// Find the first range where the content differs and scroll to it
|
||||
if (fileExists) {
|
||||
const diffResult = diff.diffLines(originalContent, newContent)
|
||||
for (let i = 0, lineCount = 0; i < diffResult.length; i++) {
|
||||
const part = diffResult[i]
|
||||
@@ -863,6 +864,7 @@ export class ClaudeDev {
|
||||
}
|
||||
lineCount += part.count || 0
|
||||
}
|
||||
}
|
||||
|
||||
// remove cursor from the document
|
||||
await vscode.commands.executeCommand("workbench.action.focusSideBar")
|
||||
|
||||
Reference in New Issue
Block a user