@@ -40,8 +40,7 @@ with the command return value encoded as JSON, pass `expectResponse=true`.
40
40
### Python example
41
41
42
42
Have a look at
43
- [ ` command_client.py ` ] ( https://github.com/knausj85/knausj_talon/blob/master/apps/vscode/command_client.py )
44
- in the knausj talon repo.
43
+ [ talon-vscode-command-client] ( https://github.com/pokey/talon-vscode-command-client ) .
45
44
46
45
## Commands
47
46
Contributes the following commands:
@@ -55,17 +54,6 @@ Contributes the following commands:
55
54
## Configuration
56
55
Contributes the following settings:
57
56
58
- ### ` command-server.backgroundWindowProtection `
59
- Turn this off if you're frequently seeing an error saying "This editor is not active".
60
-
61
- ``` json
62
- {
63
- "command-server.backgroundWindowProtection" : false
64
- }
65
- ```
66
-
67
- Defaults to ` true ` (protection enabled).
68
-
69
57
### ` command-server.allowList `
70
58
Allows user to specify the allowed commands using glob syntax, eg:
71
59
@@ -93,20 +81,27 @@ Defaults to `[]` (doesn't deny anything).
93
81
94
82
## Known issues
95
83
96
- - If you see errors saying "This editor is not active", disable
97
- ` command-server.backgroundWindowProtection ` , as described above. VSCode
98
- seems to be a bit inconsistent with determining which window has
99
- focus. There is code in the command server that tries to prevent a
100
- background window from inadvertently executing a command, but when the
101
- focused window detection fails, it will end up preventing correct commands
102
- from running.
103
84
- The server won't respond until the extension is loaded. This may be obvious,
104
85
but just be aware that if you have other extensions that take a while to
105
86
load, the server might not respond for a little while after you load an
106
87
editor window until everything is fully loaded.
88
+ - There is a very unlikely race condition. If the front VSCode is hung
89
+ when you issue a command, and then you switch to another VSCode, and issue a
90
+ command, then if the first instance wakes up at the exact right moment it
91
+ could execute the command. There is code in the command server that tries to
92
+ prevent a background window from inadvertently executing a command, but
93
+ VSCode seems to be a bit inconsistent with determining which window has
94
+ focus. When this focused window detection fails, it will end up [ preventing
95
+ correct commands from running] ( https://github.com/knausj85/knausj_talon/issues/466 ) . Thus, this protection has been disabled by
96
+ default, as the scenario it protects against has never been observed in practice. If you do have issues with background windows trying to execute
97
+ commands, please file an issue, and we can look into another way to prevent
98
+ this from occurring.
107
99
108
100
## Release Notes
109
101
102
+ ### 0.5.1
103
+ - Disable background window protection by default.
104
+
110
105
### 0.5.0
111
106
- Improve robustness, and add ` command-server.backgroundWindowProtection ` setting
112
107
0 commit comments