From 2c7174a5a245ff5d7e4e9f7a1fafb578be9a3ef2 Mon Sep 17 00:00:00 2001 From: Roy Li Date: Thu, 16 Mar 2023 15:46:50 -0400 Subject: fix(repl): Hide indexable properties in tab completion (#18141) Closes #17831. This change hides the indices of any indexed collection when triggering tab completion for object properties in the REPL. An example is shown in the issue, but for verbosity here is another. Before the change: ``` > const arr = new Uint8ClampedArray([1, 2, 3]) undefined > arr. 0 map 1 reverse 2 reduce ... ``` After the change: ``` > const arr = new Uint8ClampedArray([1, 2, 3]) undefined > arr. constructor reduce BYTES_PER_ELEMENT reduceRight buffer set ... ``` Co-authored-by: David Sherret --- cli/tools/repl/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/tools') diff --git a/cli/tools/repl/editor.rs b/cli/tools/repl/editor.rs index e1cda21e1..e12b9314b 100644 --- a/cli/tools/repl/editor.rs +++ b/cli/tools/repl/editor.rs @@ -109,7 +109,7 @@ impl EditorHelper { own_properties: None, accessor_properties_only: None, generate_preview: None, - non_indexed_properties_only: None, + non_indexed_properties_only: Some(true), }), ) .ok()?; -- cgit v1.2.3