Merge branch 'main' into select-on-rename
This commit is contained in:
commit
951fd1ab36
28 changed files with 1063 additions and 257 deletions
|
@ -1,5 +1,5 @@
|
|||
use super::{
|
||||
fold_map::{self, FoldEdit, FoldPoint, FoldSnapshot, ToFoldPoint},
|
||||
fold_map::{self, FoldEdit, FoldPoint, FoldSnapshot},
|
||||
TextHighlights,
|
||||
};
|
||||
use crate::MultiBufferSnapshot;
|
||||
|
@ -212,10 +212,6 @@ impl TabSnapshot {
|
|||
TabPoint::new(input.row(), expanded as u32)
|
||||
}
|
||||
|
||||
pub fn from_point(&self, point: Point, bias: Bias) -> TabPoint {
|
||||
self.to_tab_point(point.to_fold_point(&self.fold_snapshot, bias))
|
||||
}
|
||||
|
||||
pub fn to_fold_point(&self, output: TabPoint, bias: Bias) -> (FoldPoint, usize, usize) {
|
||||
let chars = self.fold_snapshot.chars_at(FoldPoint::new(output.row(), 0));
|
||||
let expanded = output.column() as usize;
|
||||
|
@ -228,6 +224,10 @@ impl TabSnapshot {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn from_point(&self, point: Point, bias: Bias) -> TabPoint {
|
||||
self.to_tab_point(self.fold_snapshot.to_fold_point(point, bias))
|
||||
}
|
||||
|
||||
pub fn to_point(&self, point: TabPoint, bias: Bias) -> Point {
|
||||
self.to_fold_point(point, bias)
|
||||
.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue