Commit 884f798
authored
Fixed extension.ts `UpdateConfigurationRequest` handler to update the global `WorkspaceConfiguration` for non-workspace opened files.
1. Checked for non-workspace opened files by testing if `vscode.workspace.workspaceFile` is undefined/null.
2. Invoked `WorkspaceConfiguration.update()` with `configurationTarget = `:
- `true`: for non-workspace files;
- `null`: otherwise.
3. Added a try-catch to log errors in update and prevent downstream failures.
4. Avoided an unnecessary `await` and used the `Thenable` chain of `update()`.
Fixes #199
Signed-off-by: Siddharth Srinivasan <[email protected]>
1 parent 78ba888 commit 884f798
1 file changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
1104 | | - | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1105 | 1119 | | |
1106 | 1120 | | |
1107 | 1121 | | |
| |||
0 commit comments