From 218d7ab7780d5e44d3badd1102a65a1be2afd00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 29 Dec 2022 22:22:47 +0100 Subject: fix(lsp): completions for private variables (#17220) --- cli/lsp/tsc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/lsp') diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index de34c7fa6..7145d00c2 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -2205,7 +2205,7 @@ impl CompletionEntry { return Some(insert_text.clone()); } } else { - return Some(self.name.replace('#', "")); + return None; } } @@ -4060,7 +4060,7 @@ mod tests { ..Default::default() }; let actual = fixture.get_filter_text(); - assert_eq!(actual, Some("abc".to_string())); + assert_eq!(actual, None); let fixture = CompletionEntry { kind: ScriptElementKind::MemberVariableElement, -- cgit v1.2.3