diff options
Diffstat (limited to 'editors/code/src/source_change.ts')
-rw-r--r-- | editors/code/src/source_change.ts | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/editors/code/src/source_change.ts b/editors/code/src/source_change.ts index b19d325d5..a336269ba 100644 --- a/editors/code/src/source_change.ts +++ b/editors/code/src/source_change.ts | |||
@@ -9,7 +9,7 @@ export interface SourceChange { | |||
9 | cursorPosition?: lc.TextDocumentPositionParams; | 9 | cursorPosition?: lc.TextDocumentPositionParams; |
10 | } | 10 | } |
11 | 11 | ||
12 | async function applySelectedSourceChange(ctx: Ctx, change: SourceChange) { | 12 | export async function applySourceChange(ctx: Ctx, change: SourceChange) { |
13 | const client = ctx.client; | 13 | const client = ctx.client; |
14 | if (!client) return; | 14 | if (!client) return; |
15 | 15 | ||
@@ -55,13 +55,3 @@ async function applySelectedSourceChange(ctx: Ctx, change: SourceChange) { | |||
55 | ); | 55 | ); |
56 | } | 56 | } |
57 | } | 57 | } |
58 | |||
59 | export async function applySourceChange(ctx: Ctx, change: SourceChange, alternativeChanges: SourceChange[] | undefined) { | ||
60 | if (alternativeChanges !== undefined && alternativeChanges.length > 0) { | ||
61 | const selectedChange = await vscode.window.showQuickPick([change, ...alternativeChanges]); | ||
62 | if (!selectedChange) return; | ||
63 | await applySelectedSourceChange(ctx, selectedChange); | ||
64 | } else { | ||
65 | await applySelectedSourceChange(ctx, change); | ||
66 | } | ||
67 | } | ||