Commit 09c9fda
Fix autocomplete-plus crash with non-workspace editors
The subsequence-provider crashes when autocomplete is triggered in editors
that are not part of the workspace (e.g., watch pane editors in hydrogen-next).
This happens because the editor buffer is not tracked in watchedBuffers.
Changes:
- Add guard in bufferToSubsequenceMatches to return empty results for
untracked buffers instead of crashing
- Filter buffers in getSuggestions to only include those in watchedBuffers
- Add null check in subsequenceMatchToType for safety
Fixes crashes when using autocomplete.watchEditor API with non-workspace
editors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent f7963ca commit 09c9fda
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
| |||
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
163 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
164 | 172 | | |
165 | 173 | | |
| 174 | + | |
166 | 175 | | |
167 | 176 | | |
168 | 177 | | |
| |||
181 | 190 | | |
182 | 191 | | |
183 | 192 | | |
| 193 | + | |
184 | 194 | | |
185 | 195 | | |
186 | 196 | | |
| |||
0 commit comments