Better bias selection for hints that prefix the type
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
parent
2b1b1225f5
commit
63074c5cd8
4 changed files with 79 additions and 42 deletions
|
@ -305,10 +305,10 @@ impl DisplayMap {
|
|||
let mut new_inlays = Vec::new();
|
||||
for (&location, hints) in new_hints {
|
||||
for hint in hints {
|
||||
let hint_anchor =
|
||||
let mut hint_anchor =
|
||||
buffer_snapshot.anchor_in_excerpt(location.excerpt_id, hint.position);
|
||||
new_inlays.push(InlayProperties {
|
||||
position: hint_anchor,
|
||||
position: hint_anchor.bias_left(&buffer_snapshot),
|
||||
text: hint.text(),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue