Skip to content

Commit 68b7d84

Browse files
committed
Restore internal applySourceChange command
1 parent c65e90f commit 68b7d84

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

editors/code/src/commands/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as vscode from 'vscode';
22
import * as lc from 'vscode-languageclient';
33

44
import { Ctx, Cmd } from '../ctx';
5+
import * as sourceChange from '../source_change';
56

67
import { analyzerStatus } from './analyzer_status';
78
import { matchingBrace } from './matching_brace';
@@ -29,6 +30,12 @@ function showReferences(ctx: Ctx): Cmd {
2930
};
3031
}
3132

33+
function applySourceChange(ctx: Ctx): Cmd {
34+
return async (change: sourceChange.SourceChange) => {
35+
sourceChange.applySourceChange(ctx, change);
36+
}
37+
}
38+
3239
export {
3340
analyzerStatus,
3441
expandMacro,
@@ -41,4 +48,5 @@ export {
4148
run,
4249
runSingle,
4350
showReferences,
51+
applySourceChange,
4452
};

editors/code/src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export async function activate(context: vscode.ExtensionContext) {
2626
// Internal commands which are invoked by the server.
2727
ctx.registerCommand('runSingle', commands.runSingle);
2828
ctx.registerCommand('showReferences', commands.showReferences);
29+
ctx.registerCommand('applySourceChange', commands.applySourceChange);
2930

3031
if (ctx.config.enableEnhancedTyping) {
3132
ctx.overrideCommand('type', commands.onEnter);

0 commit comments

Comments
 (0)