WIP: Start moving toward a simpler interface for detecting prev/next line boundaries

This commit is contained in:
Nathan Sobo
2021-12-27 22:11:05 -08:00
parent 89bbfb8154
commit 7f786ca8a6
3 changed files with 125 additions and 138 deletions
@@ -672,15 +672,6 @@ impl WrapSnapshot {
WrapPoint(cursor.start().1 .0 + (point.0 - cursor.start().0 .0))
}
pub fn from_tab_point_with_clipping(&self, point: TabPoint, bias: Bias) -> WrapPoint {
let mut cursor = self.transforms.cursor::<(TabPoint, WrapPoint)>();
cursor.seek(&point, bias, &());
self.clip_point(
WrapPoint(cursor.start().1 .0 + (point.0 - cursor.start().0 .0)),
bias,
)
}
pub fn clip_point(&self, mut point: WrapPoint, bias: Bias) -> WrapPoint {
if bias == Bias::Left {
let mut cursor = self.transforms.cursor::<WrapPoint>();