mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Fix issue where cline's edits would stream into active editor instead of diff view editor
This commit is contained in:
@@ -89,16 +89,12 @@ export class DiffViewProvider {
|
|||||||
accumulatedLines.pop() // remove the last partial line only if it's not the final update
|
accumulatedLines.pop() // remove the last partial line only if it's not the final update
|
||||||
}
|
}
|
||||||
const diffLines = accumulatedLines.slice(this.streamedLines.length)
|
const diffLines = accumulatedLines.slice(this.streamedLines.length)
|
||||||
const document = vscode.window.activeTextEditor?.document
|
|
||||||
|
const document = this.activeDiffEditor?.document
|
||||||
if (!document) {
|
if (!document) {
|
||||||
console.error("No active text editor")
|
throw new Error("User closed text editor, unable to edit file...")
|
||||||
return
|
|
||||||
}
|
|
||||||
const diffViewEditor = vscode.window.activeTextEditor
|
|
||||||
if (!diffViewEditor) {
|
|
||||||
console.error("No active diff view editor")
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < diffLines.length; i++) {
|
for (let i = 0; i < diffLines.length; i++) {
|
||||||
const currentLine = this.streamedLines.length + i
|
const currentLine = this.streamedLines.length + i
|
||||||
// Replace all content up to the current line with accumulated lines
|
// Replace all content up to the current line with accumulated lines
|
||||||
|
|||||||
Reference in New Issue
Block a user