Skip to content

Commit 53a5374

Browse files
committed
Update codeit-autocomplete.js
1 parent 6f60a85 commit 53a5374

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/plugins/codeit-autocomplete.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,14 @@ acp.lang.js.autocomplete = (query) => {
292292

293293
if (currObject) {
294294

295-
// get all keys in object
295+
// search keys in object
296296
for (const name in currObject) {
297297

298-
results.push(name);
298+
if (key.startsWith(acp.curr.query)) {
299+
300+
results.push(name);
301+
302+
}
299303

300304
}
301305

0 commit comments

Comments
 (0)