From c565ec2d6e736c90b8c5a6b89795022d1cc1c1a3 Mon Sep 17 00:00:00 2001 From: Ville Penttinen Date: Sat, 23 Feb 2019 13:05:45 +0200 Subject: Add name_range field to FileSymbol This contains the syntax range of the name itself, allowing NavigationTarget to properly set the focus_range. This should make it so that when using symbol based navigation, we should always focus on the name, instead of the full range. --- crates/ra_ide_api/src/navigation_target.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide_api/src/navigation_target.rs') diff --git a/crates/ra_ide_api/src/navigation_target.rs b/crates/ra_ide_api/src/navigation_target.rs index 2c9ec970a..ce5ae0363 100644 --- a/crates/ra_ide_api/src/navigation_target.rs +++ b/crates/ra_ide_api/src/navigation_target.rs @@ -67,7 +67,7 @@ impl NavigationTarget { name: symbol.name.clone(), kind: symbol.ptr.kind(), full_range: symbol.ptr.range(), - focus_range: None, + focus_range: symbol.name_range, container_name: symbol.container_name.clone(), } } -- cgit v1.2.3