aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/extend_selection.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-04-28 14:43:10 +0100
committerFlorian Diebold <[email protected]>2019-04-28 15:03:49 +0100
commit85633656dfc3ad4516a99e3062599e3ee85a578d (patch)
tree6b037199384ddf1021c2ad81886425dfcb8271a8 /crates/ra_ide_api/src/extend_selection.rs
parent1dd3d9bc2d328e164c594f3d2022dcf174f907a9 (diff)
Fix hover on the beginning of a nested expression
E.g. in ``` let foo = 1u32; if true { <|>foo; } ``` the hover shows `()`, the type of the whole if expression, instead of the more sensible `u32`. The reason for this was that the search for an expression was slightly left-biased: When on the edge between two tokens, it first looked at all ancestors of the left token and then of the right token. Instead merge the ancestors in ascending order, so that we get the smaller of the two possible expressions.
Diffstat (limited to 'crates/ra_ide_api/src/extend_selection.rs')
0 files changed, 0 insertions, 0 deletions