|
@ -1,7 +1,7 @@ |
|
|
'use strict'; |
|
|
'use strict'; |
|
|
import { commands, Disposable, SourceControlResourceGroup, SourceControlResourceState, TextDocumentShowOptions, TextEditor, TextEditorEdit, Uri, window, workspace } from 'vscode'; |
|
|
import { commands, Disposable, SourceControlResourceGroup, SourceControlResourceState, TextDocumentShowOptions, TextEditor, TextEditorEdit, Uri, window, workspace } from 'vscode'; |
|
|
import { ExplorerNode } from '../views/explorerNodes'; |
|
|
import { ExplorerNode } from '../views/explorerNodes'; |
|
|
import { GitBranch, GitCommit, GitRemote } from '../gitService'; |
|
|
|
|
|
|
|
|
import { GitBranch, GitCommit, GitRemote, GitUri } from '../gitService'; |
|
|
import { Logger } from '../logger'; |
|
|
import { Logger } from '../logger'; |
|
|
import { Telemetry } from '../telemetry'; |
|
|
import { Telemetry } from '../telemetry'; |
|
|
|
|
|
|
|
@ -277,6 +277,10 @@ export async function openEditor(uri: Uri, options?: TextDocumentShowOptions): P |
|
|
viewColumn: (window.activeTextEditor && window.activeTextEditor.viewColumn) || 1 |
|
|
viewColumn: (window.activeTextEditor && window.activeTextEditor.viewColumn) || 1 |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
if (uri instanceof GitUri) { |
|
|
|
|
|
uri = Uri.file(uri.fsPath); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const document = await workspace.openTextDocument(uri); |
|
|
const document = await workspace.openTextDocument(uri); |
|
|
return window.showTextDocument(document, { ...defaults, ...(options || {}) }); |
|
|
return window.showTextDocument(document, { ...defaults, ...(options || {}) }); |
|
|
} |
|
|
} |
|
|