mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: fix diffview scoll display (#3783)
This commit is contained in:
parent
7d99689031
commit
3c73684729
1 changed files with 5 additions and 2 deletions
|
|
@ -122,7 +122,7 @@ export class DiffViewProvider {
|
|||
const endLine = accumulatedLines.length
|
||||
// Replace all content up to the current line with accumulated lines.
|
||||
const edit = new vscode.WorkspaceEdit()
|
||||
const rangeToReplace = new vscode.Range(0, 0, endLine + 1, 0)
|
||||
const rangeToReplace = new vscode.Range(0, 0, endLine, 0)
|
||||
const contentToReplace = accumulatedLines.slice(0, endLine + 1).join("\n") + "\n"
|
||||
edit.replace(document.uri, rangeToReplace, this.stripAllBOMs(contentToReplace))
|
||||
await vscode.workspace.applyEdit(edit)
|
||||
|
|
@ -130,7 +130,10 @@ export class DiffViewProvider {
|
|||
this.activeLineController.setActiveLine(endLine)
|
||||
this.fadedOverlayController.updateOverlayAfterLine(endLine, document.lineCount)
|
||||
// Scroll to the current line.
|
||||
this.scrollEditorToLine(endLine)
|
||||
const ranges = this.activeDiffEditor?.visibleRanges
|
||||
if (ranges && ranges.length > 0 && ranges[0].start.line < endLine && ranges[0].end.line > endLine) {
|
||||
this.scrollEditorToLine(endLine)
|
||||
}
|
||||
|
||||
// Update the streamedLines with the new accumulated content.
|
||||
this.streamedLines = accumulatedLines
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue