diff options
author | Seivan Heidari <[email protected]> | 2019-12-23 14:35:31 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-12-23 14:35:31 +0000 |
commit | b21d9337d9200e2cfdc90b386591c72c302dc03e (patch) | |
tree | f81f5c08f821115cee26fa4d3ceaae88c7807fd5 /editors/code/src/commands/matching_brace.ts | |
parent | 18a0937585b836ec5ed054b9ae48e0156ab6d9ef (diff) | |
parent | ce07a2daa9e53aa86a769f8641b14c2878444fbc (diff) |
Merge branch 'master' into feature/themes
Diffstat (limited to 'editors/code/src/commands/matching_brace.ts')
-rw-r--r-- | editors/code/src/commands/matching_brace.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/code/src/commands/matching_brace.ts b/editors/code/src/commands/matching_brace.ts index d86faf405..364208cc7 100644 --- a/editors/code/src/commands/matching_brace.ts +++ b/editors/code/src/commands/matching_brace.ts | |||
@@ -17,15 +17,15 @@ export async function handle() { | |||
17 | textDocument: { uri: editor.document.uri.toString() }, | 17 | textDocument: { uri: editor.document.uri.toString() }, |
18 | offsets: editor.selections.map(s => { | 18 | offsets: editor.selections.map(s => { |
19 | return Server.client.code2ProtocolConverter.asPosition(s.active); | 19 | return Server.client.code2ProtocolConverter.asPosition(s.active); |
20 | }) | 20 | }), |
21 | }; | 21 | }; |
22 | const response = await Server.client.sendRequest<Position[]>( | 22 | const response = await Server.client.sendRequest<Position[]>( |
23 | 'rust-analyzer/findMatchingBrace', | 23 | 'rust-analyzer/findMatchingBrace', |
24 | request | 24 | request, |
25 | ); | 25 | ); |
26 | editor.selections = editor.selections.map((sel, idx) => { | 26 | editor.selections = editor.selections.map((sel, idx) => { |
27 | const active = Server.client.protocol2CodeConverter.asPosition( | 27 | const active = Server.client.protocol2CodeConverter.asPosition( |
28 | response[idx] | 28 | response[idx], |
29 | ); | 29 | ); |
30 | const anchor = sel.isEmpty ? active : sel.anchor; | 30 | const anchor = sel.isEmpty ? active : sel.anchor; |
31 | return new vscode.Selection(anchor, active); | 31 | return new vscode.Selection(anchor, active); |