aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-30 22:45:50 +0000
committerAleksey Kladov <[email protected]>2019-12-30 22:46:13 +0000
commit68b7d84974aac3c5eec98b43f63e806dac60b86e (patch)
treefaac0da2bd561bb42d2ad62af0f2e9e80a5ff344
parentc65e90f7b8a74fde62a77ad6d1c8d28dfa98502c (diff)
Restore internal applySourceChange command
-rw-r--r--editors/code/src/commands/index.ts8
-rw-r--r--editors/code/src/main.ts1
2 files changed, 9 insertions, 0 deletions
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts
index 89af4be90..c28709c8a 100644
--- a/editors/code/src/commands/index.ts
+++ b/editors/code/src/commands/index.ts
@@ -2,6 +2,7 @@ import * as vscode from 'vscode';
2import * as lc from 'vscode-languageclient'; 2import * as lc from 'vscode-languageclient';
3 3
4import { Ctx, Cmd } from '../ctx'; 4import { Ctx, Cmd } from '../ctx';
5import * as sourceChange from '../source_change';
5 6
6import { analyzerStatus } from './analyzer_status'; 7import { analyzerStatus } from './analyzer_status';
7import { matchingBrace } from './matching_brace'; 8import { matchingBrace } from './matching_brace';
@@ -29,6 +30,12 @@ function showReferences(ctx: Ctx): Cmd {
29 }; 30 };
30} 31}
31 32
33function applySourceChange(ctx: Ctx): Cmd {
34 return async (change: sourceChange.SourceChange) => {
35 sourceChange.applySourceChange(ctx, change);
36 }
37}
38
32export { 39export {
33 analyzerStatus, 40 analyzerStatus,
34 expandMacro, 41 expandMacro,
@@ -41,4 +48,5 @@ export {
41 run, 48 run,
42 runSingle, 49 runSingle,
43 showReferences, 50 showReferences,
51 applySourceChange,
44}; 52};
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 20a3ea119..0c4abdac8 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -26,6 +26,7 @@ export async function activate(context: vscode.ExtensionContext) {
26 // Internal commands which are invoked by the server. 26 // Internal commands which are invoked by the server.
27 ctx.registerCommand('runSingle', commands.runSingle); 27 ctx.registerCommand('runSingle', commands.runSingle);
28 ctx.registerCommand('showReferences', commands.showReferences); 28 ctx.registerCommand('showReferences', commands.showReferences);
29 ctx.registerCommand('applySourceChange', commands.applySourceChange);
29 30
30 if (ctx.config.enableEnhancedTyping) { 31 if (ctx.config.enableEnhancedTyping) {
31 ctx.overrideCommand('type', commands.onEnter); 32 ctx.overrideCommand('type', commands.onEnter);