From 34d5d77cfa09f4460a0851b5650f441771e7373e Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 4 Feb 2021 11:37:14 +0100 Subject: Increase Highlights highlight range to covering element --- crates/ide/src/syntax_highlighting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index a3d4e4f77..9bed329d8 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs @@ -72,7 +72,7 @@ pub(crate) fn highlight( } }; - let mut hl = highlights::Highlights::new(range_to_highlight); + let mut hl = highlights::Highlights::new(root.text_range()); traverse(&mut hl, &sema, &root, range_to_highlight, syntactic_name_ref_highlighting); hl.to_vec() } -- cgit v1.2.3