Implement SelectNext

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2021-11-25 15:44:06 +01:00
parent bf7acb5f34
commit 10b3fae2c3
6 changed files with 247 additions and 63 deletions

View file

@ -418,6 +418,12 @@ impl DisplayPoint {
}
}
impl ToDisplayPoint for usize {
fn to_display_point(&self, map: &DisplayMapSnapshot) -> DisplayPoint {
map.point_to_display_point(self.to_point(&map.buffer_snapshot), Bias::Left)
}
}
impl ToDisplayPoint for Point {
fn to_display_point(&self, map: &DisplayMapSnapshot) -> DisplayPoint {
map.point_to_display_point(*self, Bias::Left)