diff options
author | Ville Penttinen <[email protected]> | 2019-02-23 11:05:45 +0000 |
---|---|---|
committer | Ville Penttinen <[email protected]> | 2019-02-23 11:05:45 +0000 |
commit | c565ec2d6e736c90b8c5a6b89795022d1cc1c1a3 (patch) | |
tree | 929e56ebef10379842a9cf223d237c94ddc70ea6 /crates/ra_ide_api/src/navigation_target.rs | |
parent | 7046b162756b0fa1b6e6e2223ffbfdf6f41ca6bc (diff) |
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.
Diffstat (limited to 'crates/ra_ide_api/src/navigation_target.rs')
-rw-r--r-- | crates/ra_ide_api/src/navigation_target.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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 { | |||
67 | name: symbol.name.clone(), | 67 | name: symbol.name.clone(), |
68 | kind: symbol.ptr.kind(), | 68 | kind: symbol.ptr.kind(), |
69 | full_range: symbol.ptr.range(), | 69 | full_range: symbol.ptr.range(), |
70 | focus_range: None, | 70 | focus_range: symbol.name_range, |
71 | container_name: symbol.container_name.clone(), | 71 | container_name: symbol.container_name.clone(), |
72 | } | 72 | } |
73 | } | 73 | } |