Skip to content

Commit 7fe2585

Browse files
committed
clean up comments
1 parent 312505e commit 7fe2585

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/integrations/editor/EditorUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,11 @@ export class EditorUtils {
219219
const absolutePath = path.resolve(cwd, relPath)
220220
const fileUri = vscode.Uri.file(absolutePath)
221221

222-
// Extract the first changed line number from the diff
223222
const firstChangedLine = this.extractFirstChangedLineFromDiff(userEdits)
224-
225-
// Open the document
223+
if (!firstChangedLine) {
224+
console.warn(`No changes found in user edits for ${relPath}`)
225+
return
226+
}
226227
const document = await vscode.workspace.openTextDocument(fileUri)
227228

228229
// Show the document with selection at the first changed line
@@ -237,7 +238,6 @@ export class EditorUtils {
237238
viewColumn: vscode.ViewColumn.Active,
238239
})
239240
} catch (error) {
240-
// Log error but don't throw - this is a nice-to-have feature
241241
console.warn(`Failed to open and scroll to edits for ${relPath}:`, error)
242242
}
243243
}

0 commit comments

Comments
 (0)