aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands/matching_brace.ts
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-09 19:31:27 +0000
committerGitHub <[email protected]>2019-12-09 19:31:27 +0000
commite292573f425eece6f1666e051d7fe64b79640d39 (patch)
tree16d7de77952895b4cebf1cbb7a18652eaf4d98b6 /editors/code/src/commands/matching_brace.ts
parent897b550049d8889804bb476e305427d07879cd63 (diff)
parent273299693b85996878907ad256ed55f072ec3f1a (diff)
Merge #2514
2514: Code: enable prettier trailing commas r=matklad a=lnicola See #2512. Co-authored-by: LaurenČ›iu Nicola <[email protected]>
Diffstat (limited to 'editors/code/src/commands/matching_brace.ts')
-rw-r--r--editors/code/src/commands/matching_brace.ts6
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);