diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/config.ts | 2 | ||||
-rw-r--r-- | editors/code/src/snippets.ts | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index fbb7a556a..d3d6e631a 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -34,7 +34,7 @@ export class Config { | |||
34 | readonly globalStoragePath: string; | 34 | readonly globalStoragePath: string; |
35 | 35 | ||
36 | constructor(ctx: vscode.ExtensionContext) { | 36 | constructor(ctx: vscode.ExtensionContext) { |
37 | this.globalStoragePath = ctx.globalStorageUri.path; | 37 | this.globalStoragePath = ctx.globalStorageUri.fsPath; |
38 | vscode.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration, this, ctx.subscriptions); | 38 | vscode.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration, this, ctx.subscriptions); |
39 | this.refreshLogging(); | 39 | this.refreshLogging(); |
40 | } | 40 | } |
diff --git a/editors/code/src/snippets.ts b/editors/code/src/snippets.ts index 9561aa345..58f7aa128 100644 --- a/editors/code/src/snippets.ts +++ b/editors/code/src/snippets.ts | |||
@@ -56,6 +56,9 @@ export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vs | |||
56 | } | 56 | } |
57 | }); | 57 | }); |
58 | if (selections.length > 0) editor.selections = selections; | 58 | if (selections.length > 0) editor.selections = selections; |
59 | if (selections.length === 1) { | ||
60 | editor.revealRange(selections[0], vscode.TextEditorRevealType.InCenterIfOutsideViewport); | ||
61 | } | ||
59 | } | 62 | } |
60 | 63 | ||
61 | function parseSnippet(snip: string): [string, [number, number]] | undefined { | 64 | function parseSnippet(snip: string): [string, [number, number]] | undefined { |