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
|
@ -49,6 +49,10 @@ impl Anchor {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn bias(&self) -> Bias {
|
||||
self.text_anchor.bias
|
||||
}
|
||||
|
||||
pub fn bias_left(&self, snapshot: &MultiBufferSnapshot) -> Anchor {
|
||||
if self.text_anchor.bias != Bias::Left {
|
||||
if let Some(excerpt) = snapshot.excerpt(self.excerpt_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue