File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments