diff options
Diffstat (limited to 'editors/code/src/commands/on_enter.ts')
-rw-r--r-- | editors/code/src/commands/on_enter.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts index 285849db7..a7871c31e 100644 --- a/editors/code/src/commands/on_enter.ts +++ b/editors/code/src/commands/on_enter.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import * as vscode from 'vscode'; | 1 | import * as vscode from 'vscode'; |
2 | import * as ra from '../rust-analyzer-api'; | 2 | import * as ra from '../rust-analyzer-api'; |
3 | 3 | ||
4 | import { applySourceChange } from '../source_change'; | ||
5 | import { Cmd, Ctx } from '../ctx'; | 4 | import { Cmd, Ctx } from '../ctx'; |
5 | import { applySnippetWorkspaceEdit } from '.'; | ||
6 | 6 | ||
7 | async function handleKeypress(ctx: Ctx) { | 7 | async function handleKeypress(ctx: Ctx) { |
8 | const editor = ctx.activeRustEditor; | 8 | const editor = ctx.activeRustEditor; |
@@ -21,7 +21,8 @@ async function handleKeypress(ctx: Ctx) { | |||
21 | }); | 21 | }); |
22 | if (!change) return false; | 22 | if (!change) return false; |
23 | 23 | ||
24 | await applySourceChange(ctx, change); | 24 | const workspaceEdit = client.protocol2CodeConverter.asWorkspaceEdit(change); |
25 | await applySnippetWorkspaceEdit(workspaceEdit); | ||
25 | return true; | 26 | return true; |
26 | } | 27 | } |
27 | 28 | ||