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