File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,7 @@ export class DiffViewProvider {
202202
203203 await vscode . window . showTextDocument ( vscode . Uri . file ( absolutePath ) , {
204204 preview : false ,
205+ preserveFocus : true ,
205206 } )
206207 await this . closeAllDiffViews ( )
207208
@@ -302,6 +303,7 @@ export class DiffViewProvider {
302303 if ( this . documentWasOpen ) {
303304 await vscode . window . showTextDocument ( vscode . Uri . file ( absolutePath ) , {
304305 preview : false ,
306+ preserveFocus : true ,
305307 } )
306308 }
307309 await this . closeAllDiffViews ( )
@@ -338,7 +340,9 @@ export class DiffViewProvider {
338340 arePathsEqual ( tab . input . modified . fsPath , uri . fsPath ) ,
339341 )
340342 if ( diffTab && diffTab . input instanceof vscode . TabInputTextDiff ) {
341- const editor = await vscode . window . showTextDocument ( diffTab . input . modified )
343+ const editor = await vscode . window . showTextDocument ( diffTab . input . modified , {
344+ preserveFocus : true ,
345+ } )
342346 return editor
343347 }
344348 // Open new diff editor
@@ -358,6 +362,9 @@ export class DiffViewProvider {
358362 } ) ,
359363 uri ,
360364 `${ fileName } : ${ fileExists ? "Original ↔ Cline's Changes" : "New File" } (Editable)` ,
365+ {
366+ preserveFocus : true ,
367+ } ,
361368 )
362369 // This may happen on very slow machines ie project idx
363370 setTimeout ( ( ) => {
You can’t perform that action at this time.
0 commit comments