aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands.ts
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-29 17:10:43 +0100
committerGitHub <[email protected]>2020-06-29 17:10:43 +0100
commit9f12903bb1f08b3ae493b8b13465028f89a76cce (patch)
treed103a1110367177e8d903eb67dcb0b845b9cd34a /editors/code/src/commands.ts
parente1a5bd866e5e27a9ee2d37bcdc5e817c1fa8672d (diff)
parent43b7d505dad2b6c4a8fd3b6ebb97c287ce06ce56 (diff)
Merge #5119
5119: Show notification while SSR is in progress r=matklad a=davidlattimore Ideally we would (a) show progress and (b) allow cancellation, but at least now there's some indication to the user that something is happening. Co-authored-by: David Lattimore <[email protected]>
Diffstat (limited to 'editors/code/src/commands.ts')
-rw-r--r--editors/code/src/commands.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts
index 5a1bc7f57..0e78f5101 100644
--- a/editors/code/src/commands.ts
+++ b/editors/code/src/commands.ts
@@ -171,9 +171,15 @@ export function ssr(ctx: Ctx): Cmd {
171 const request = await vscode.window.showInputBox(options); 171 const request = await vscode.window.showInputBox(options);
172 if (!request) return; 172 if (!request) return;
173 173
174 const edit = await client.sendRequest(ra.ssr, { query: request, parseOnly: false }); 174 vscode.window.withProgress({
175 175 location: vscode.ProgressLocation.Notification,
176 await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit)); 176 title: "Structured search replace in progress...",
177 cancellable: false,
178 }, async (_progress, _token) => {
179 const edit = await client.sendRequest(ra.ssr, { query: request, parseOnly: false });
180
181 await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit));
182 });
177 }; 183 };
178} 184}
179 185