aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-11 15:17:20 +0000
committerAleksey Kladov <[email protected]>2019-01-11 15:32:22 +0000
commitdda916bc4d51383fcf84f736bd12c7a77c445fb0 (patch)
tree1d1a8246105eba1a16fd066365ea095ff0377740 /crates/ra_lsp_server/src
parent8a5f74a24f726a839f3a0e154cfadec23040e14c (diff)
fix tests
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/conv.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs
index aad698da1..76fa98cbe 100644
--- a/crates/ra_lsp_server/src/conv.rs
+++ b/crates/ra_lsp_server/src/conv.rs
@@ -345,7 +345,8 @@ impl TryConvWith for &NavigationTarget {
345 type Output = Location; 345 type Output = Location;
346 fn try_conv_with(self, world: &ServerWorld) -> Result<Location> { 346 fn try_conv_with(self, world: &ServerWorld) -> Result<Location> {
347 let line_index = world.analysis().file_line_index(self.file_id()); 347 let line_index = world.analysis().file_line_index(self.file_id());
348 to_location(self.file_id(), self.range(), &world, &line_index) 348 let range = self.focus_range().unwrap_or(self.full_range());
349 to_location(self.file_id(), range, &world, &line_index)
349 } 350 }
350} 351}
351 352
@@ -361,7 +362,7 @@ pub fn to_location_link(
361 let res = LocationLink { 362 let res = LocationLink {
362 origin_selection_range: Some(target.range.conv_with(line_index)), 363 origin_selection_range: Some(target.range.conv_with(line_index)),
363 target_uri: url.to_string(), 364 target_uri: url.to_string(),
364 target_range: target.info.range().conv_with(&tgt_line_index), 365 target_range: target.info.full_range().conv_with(&tgt_line_index),
365 target_selection_range: target 366 target_selection_range: target
366 .info 367 .info
367 .focus_range() 368 .focus_range()