mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Fixes #21065 - Open js/ts config in same column as active editor
This commit is contained in:
parent
e000772e9c
commit
151986295e
|
@ -464,7 +464,8 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost {
|
|||
const { configFileName } = res.body;
|
||||
if (configFileName && configFileName.indexOf('/dev/null/') !== 0) {
|
||||
return workspace.openTextDocument(configFileName)
|
||||
.then(window.showTextDocument);
|
||||
.then(doc =>
|
||||
window.showTextDocument(doc, window.activeTextEditor ? window.activeTextEditor.viewColumn : undefined));
|
||||
}
|
||||
|
||||
return window.showInformationMessage<ProjectConfigMessageItem>(
|
||||
|
@ -485,7 +486,8 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost {
|
|||
const configFile = Uri.file(path.join(rootPath, isTypeScriptProject ? 'tsconfig.json' : 'jsconfig.json'));
|
||||
return workspace.openTextDocument(configFile)
|
||||
.then(undefined, _ => workspace.openTextDocument(configFile.with({ scheme: 'untitled' })))
|
||||
.then(window.showTextDocument);
|
||||
.then(doc =>
|
||||
window.showTextDocument(doc, window.activeTextEditor ? window.activeTextEditor.viewColumn : undefined));
|
||||
|
||||
case ProjectConfigAction.LearnMore:
|
||||
if (isTypeScriptProject) {
|
||||
|
|
Loading…
Reference in a new issue