Commit e11acc5
repl: fix autocomplete when useGlobal is false
This fixes two issues in the REPL when it is started with a new context
(useGlobal option set to `false`):
- The `primordials` object does not contain all builtins, so the
filtering based on property names from `primordials` was wrong.
- The autocompleter did not take builtin names into account because
they are not properties of the context object.
A list of all global builtin names is created lazily when needed. It is
used for filtering for the copy and for adding those names to the
autocompleter list.
Fixes: #30792
PR-URL: #30883
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: David Carlier <[email protected]>1 parent a326309 commit e11acc5
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
935 | 938 | | |
936 | 939 | | |
937 | 940 | | |
938 | | - | |
939 | | - | |
| 941 | + | |
| 942 | + | |
940 | 943 | | |
941 | 944 | | |
942 | 945 | | |
| |||
1283 | 1286 | | |
1284 | 1287 | | |
1285 | 1288 | | |
1286 | | - | |
1287 | | - | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
1288 | 1297 | | |
1289 | 1298 | | |
1290 | 1299 | | |
| |||
0 commit comments