Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit 6a580eb

Browse files
committed
Remove the double negative
1 parent 0e1114b commit 6a580eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extension.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function whenChangingWorkspaceFolders(
175175
// Don't use URI as it's unreliable the same path might not become the same URI.
176176
const workspaces: Map<string, ClientWorkspace> = new Map();
177177
let activeWorkspace: ClientWorkspace | null;
178-
let commandsUnregistered: boolean = true;
178+
let commandsRegistered: boolean = false;
179179

180180
// We run one RLS and one corresponding language client per workspace folder
181181
// (VSCode workspace, not Cargo workspace). This class contains all the per-client
@@ -279,7 +279,7 @@ class ClientWorkspace {
279279
}
280280

281281
this.disposables.forEach(d => d.dispose());
282-
commandsUnregistered = true;
282+
commandsRegistered = false;
283283
}
284284

285285
private registerCommands(
@@ -289,11 +289,11 @@ class ClientWorkspace {
289289
if (!this.lc) {
290290
return;
291291
}
292-
if (multiProjectEnabled && !commandsUnregistered) {
292+
if (multiProjectEnabled && commandsRegistered) {
293293
return;
294294
}
295295

296-
commandsUnregistered = false;
296+
commandsRegistered = true;
297297
const rustupUpdateDisposable = commands.registerCommand(
298298
'rls.update',
299299
() => {

0 commit comments

Comments
 (0)