Fixing #78474 don't move focus on click

This commit is contained in:
Erich Gamma 2019-08-27 11:42:10 +02:00
parent c587f23553
commit 67b0d5805e

View file

@ -258,7 +258,7 @@ export class NpmScriptsTreeDataProvider implements TreeDataProvider<TreeItem> {
let document: TextDocument = await workspace.openTextDocument(uri);
let offset = this.findScript(document, selection instanceof NpmScript ? selection : undefined);
let position = document.positionAt(offset);
await window.showTextDocument(document, { selection: new Selection(position, position) });
await window.showTextDocument(document, { preserveFocus: true, selection: new Selection(position, position) });
}
public refresh() {
@ -353,4 +353,4 @@ export class NpmScriptsTreeDataProvider implements TreeDataProvider<TreeItem> {
}
return [...folders.values()];
}
}
}