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.
This commit is contained in:
Ville Penttinen 2019-02-23 13:05:45 +02:00
parent 7046b16275
commit c565ec2d6e
2 changed files with 17 additions and 7 deletions

View file

@ -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(),
}
}