fix: prefer targetSelectionRange over targeRange if both are provided by LSP
This prevents rust-analyser sending goto_definition to the very beginning of the definition, including doc comments and attributes. closes #261
This commit is contained in:
parent
cb399a4c73
commit
1eb36696d2
1 changed files with 2 additions and 2 deletions
|
@ -758,8 +758,8 @@ fn navigate_to_location_link(from: tp.pid_ref, location_link: []const u8) (Clien
|
|||
from.send(.{ "cmd", "navigate", .{
|
||||
.file = file_path,
|
||||
.goto = .{
|
||||
targetRange.?.start.line + 1,
|
||||
targetRange.?.start.character + 1,
|
||||
targetSelectionRange.?.start.line + 1,
|
||||
targetSelectionRange.?.start.character + 1,
|
||||
sel.start.line,
|
||||
sel.start.character,
|
||||
sel.end.line,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue